I'm new to haskell and I'm learning from one of the books. I came across an example in which I have the following error but I don't know why.
myMap :: (a -> b) -> [a] -> [b]
myMap _ _ = []
myMap f (x:xs) = f x : myMap f xs
The error is in the last line : Pattern match is redundant.
If anyone can help, thanks.