This is kind of silly, but I was going through the Ninety-Nine Haskell Problems exercises, and I just wanted to note that the solutions page for the palindrome exercise is missing an extremely simple and elegant point-free solution using the >>=
operator:
isPalindrome :: (Eq a) => [a] -> Bool
isPalindrome = reverse >>= (==)
While the page does include a monadic solution utilizing liftM2
, it might be helpful to include this solution as well. As a newcomer, discovering this solution helped broaden my view of what monads are and how the >>=
operator can be used.