RosettaCodeData/Task/Palindrome-detection/Sidef/palindrome-detection-3.sidef
2023-07-18 13:51:12 -07:00

11 lines
173 B
Text
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

func palindrome(s) {
if (s.len <= 1) {
true
}
elsif (s.first != s.last) {
false
}
else {
__FUNC__(s.first(-1).last(-1))
}
}