I have just started learning haskell and wrote a customized code for any function. Please suggest why does it still shows Non-exhaustive patterns error even after I have used otherwise or where I am going wrong?
Exceptiom raised :- Exception: main.hs:(37,1)-(40,21): Non-exhaustive patterns in function myAny
myAny :: (a -> Bool) -> [a] -> Bool
myAny f (x:xs)
| f x == True = True
| f x == False = myAny f xs
| otherwise = False