I found a bug where the variable "ms" is used instead of "t". This causes the program to crash because "ms" is not defined anywhere.
I am forwarding the answer I think is right.
catMaybes :: [Maybe a] -> [a] catMaybes [] = [] catMaybes ((Just a):t) = a:catMaybes t catMaybes ((Nothing):t) = catMaybes t
I found a bug where the variable "ms" is used instead of "t". This causes the program to crash because "ms" is not defined anywhere.
I am forwarding the answer I think is right.
catMaybes :: [Maybe a] -> [a] catMaybes [] = [] catMaybes ((Just a):t) = a:catMaybes t catMaybes ((Nothing):t) = catMaybes t