blob: 5f67e651fc167c3d1a1e8825ed6599cfb19e39fb (
plain) (
blame)
1
2
3
4
5
6
7
8
|
unit module Anagram;
sub match-anagrams (Str :$subject!, :@candidates!) is export {
gather for @candidates {
next if .fc eq $subject.fc;
take $_ if .fc.comb.Bag eqv $subject.fc.comb.Bag;
}
}
|