Created
May 8, 2010 11:15
-
-
Save proppy/394508 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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