
16 Feb
2009
16 Feb
'09
1:30 p.m.
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