RosettaCodeData/Task/Palindrome-detection/MAXScript/palindrome-detection-2.max
2023-07-01 13:44:08 -04:00

15 lines
228 B
Text

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))
)
)