I have the following function:
type Coordin = (Int,Int)
data Grid = Open
| Taken Int
myOwn :: Coordin -> Grid -> Bool
myOwn (x,y) grid
| ((board)!!(y)!!(x)) == Taken n = True
| otherwise = False
I would like n to mean any number (as Int is specified as such in Data Grid for that particular type) but the thing just won’t work!! I thought about using a where clause but if there are any other ideas it would be much appreciated. Thanks.
With inspiration form camccann’s solution: