Skip to content

Instantly share code, notes, and snippets.

@proppy
Created May 8, 2010 11:15
Show Gist options
  • Save proppy/394508 to your computer and use it in GitHub Desktop.
Save proppy/394508 to your computer and use it in GitHub Desktop.
isPalindrome :: Eq a => [a] -> Bool
isPalindrome [] = True
isPalindrome [x] = True
isPalindrome (x:xs) = (x == (last xs)) && isPalindrome (init xs)
prop_isPalindrome xs = isPalindrome xs == (xs == reverse xs) where types = (xs :: [Char])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment