RosettaCodeData/Task/Palindrome-detection/MAXScript/palindrome-detection-2.max

16 lines
228 B
Plaintext

fn isPalindrome_r s =
(
if s.count <= 1 then
(
true
)
else
(
if s[1] != s[s.count] then
(
return false
)
isPalindrome_r (substring s 2 (s.count-2))
)
)