17 Feb
2009
17 Feb
'09
midnight
Here's a solution harder on the machine, easier on the brain: isPalindrome :: Eq a => [a] -> Bool isPalindrome xs = and $ zipWith (==) xs $ reverse xs On Feb 16, 2009, at 1:04 PM, Thomas Davie wrote:
isPalindrome xs = take l xs == (take l $ reverse xs) where l = length xs `div` 2