Palindrome pairs: Difference between revisions

m
→‎{{header|Perl 6}}: Slightly better palindrome detection. Ignore, case, punctuation and white-space. Same output
(→‎{{header|Perl 6}}: Add a Perl 6 example)
m (→‎{{header|Perl 6}}: Slightly better palindrome detection. Ignore, case, punctuation and white-space. Same output)
Line 18:
<lang perl6>my @words = <abcd dcba lls s sssll>;
 
sub is-palindrome (Str $s) { $s_ eq .flip given $s.fliplc.comb(/\w/).join }
 
for @words.combinations(2) {
10,327

edits