I created this program to return a list of positions of a matrix that no has zero value.
This Code:
type Pos = (Int,Int)
type Matrix = [[Int]]
v0 [Pos]->Matrix->[Pos]
v0 [] m =[]
v0 [p:ps] m = if ((takeH m p) == 0) then v0 ps m
else p:v0 ps m
takeH:: Matrix->Pos->Int
takeH m (i,j)= (m!!(i-1))!!(j-1)
Produces this error:
Parse error on input '->'
Failed,modules loades: nome.
Why ?
I hope that I've been clear.
::inv0 [Pos]->Matrix->[Pos]?v0 :: [Pos]->Matrix->[Pos]