playground/haskell/99-problems/6.hs

11 lines
172 B
Haskell

-- Check whether a list is a palindrome
-- incomplete
isPalindrome :: [a] -> bool
isPalindrome [] = []
isPalindrome [x] = x
isPalindrome (x:xs) = x == isPalindrome xs