RosettaCodeData/Task/Palindrome-detection/Haskell/palindrome-detection-3.hs
2017-09-25 22:28:19 +02:00

3 lines
151 B
Haskell

is_palindrome_r x | length x <= 1 = True
| head x == last x = is_palindrome_r . tail. init $ x
| otherwise = False