I am new to Haskell and I have a problem with one program. The main problem is in the declaration, but I don't know how to write it properly. I need to check if the matrix is an actual matrix and my idea is to check if the number of elements in the first list is equal to the number of elements in the other lists.
Thanks in advance!
isMatrix ::[[Int]] -> Bool
isMatrix [] _ = False
isMatrix xs ys | ((len xs) == (len ys)) = True
| otherwise = False
len :: [Int] -> Int
len [] = @
len (_:zs) = 1+ len zs