RosettaCodeData/Task/Palindrome-detection/Perl-6/palindrome-detection.pl6
Ingy döt Net 776bba907c Sync
2013-10-27 22:24:23 +00:00

13 lines
293 B
Raku

subset Palindrom of Str where {
.flip eq $_ given .comb(/\w+/).join.lc
}
my @tests = q:to/END/.lines;
A man, a plan, a canal: Panama.
My dog has fleas
Madam, I'm Adam.
1 on 1
In girum imus nocte et consumimur igni
END
for @tests { say $_ ~~ Palindrom, "\t", $_ }