Palindrome detection: Difference between revisions
Content deleted Content added
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
Line 2,175: | Line 2,175: | ||
=={{header|Langur}}== |
=={{header|Langur}}== |
||
<lang Langur># String indexing is by code point (and 1-based), so using len(.s)..1 reverses by code points. |
<lang Langur># String indexing is by code point (and 1-based), so using len(.s)..1 reverses by code points. |
||
val .ispal = f |
val .ispal = f len(.s) > 0 and .s == .s[len(.s)..1] |
||
# .s an implied parameter of the function |
|||
val .tests = h{ |
val .tests = h{ |