Skip to content

Instantly share code, notes, and snippets.

@Daenyth
Created July 23, 2010 05:08
Show Gist options
  • Save Daenyth/487038 to your computer and use it in GitHub Desktop.
Save Daenyth/487038 to your computer and use it in GitHub Desktop.
isPalindrome :: (Show a) => a -> Bool
isPalindrome a = show a == reverse $ show a
Couldn't match expected type `String'
against inferred type `[a] -> [a]'
In the second argument of `(==)', namely `reverse'
In the first argument of `($)', namely `show a == reverse'
In the expression: show a == reverse $ show a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment