Palindrome detection: Difference between revisions

m
Line 5,384:
 
'''Built-in'''
<syntaxhighlight lang="ruby">say "noon".is_palindrome; # true</syntaxhighlight>
 
'''Non-recursive'''
Line 5,398:
true
}
elsif (s.first  != s.last) {
false
}
else {
__FUNC__(s.ftfirst(-1, ).last(-21))
}
}</syntaxhighlight>
2,747

edits