
16 Feb
2009
16 Feb
'09
1:38 p.m.
On 16 Feb 2009, at 19:30, Dave Bayer wrote:
Here's a solution harder on the machine, easier on the brain:
isPalindrome :: Eq a => [a] -> Bool isPalindrome xs = and $ zipWith (==) xs $ reverse xs
Lets just tidy that up a little... isPalindrome = (and . zipWith (==)) <*> reverse But I don't see how either is easier on the brain than xs == reverse xs. Bob