RosettaCodeData/Task/Palindrome-detection/Haskell/palindrome-detection-3.hs
2023-07-01 13:44:08 -04: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