Palindrome detection: Difference between revisions

m (→‎{{header|Haskell}}: Added a comment to a version better suited to indexed arrays than to linked lists.)
Line 2,602:
See the C palindrome_r code for an explanation of the concept used in this solution,
though it may be better suited to indexed arrays than to linked lists.
 
(last is expensive, and entails multiplied recursions over the right hand side
of the remaining list here).
 
<lang haskell>is_palindrome_r x | length x <= 1 = True
9,655

edits