exercise: Anagram
version: 3
plan: 16
tests: |-
cmp-ok match-anagrams( |%(.:p) ), '~~', ..Set, . for $c-data.values;
unit: module
example: |-
sub match-anagrams ( :$subject!, :@candidates! ) is export {
given $subject.uc -> $ucs {
@candidates.grep: { given .uc {$_ ne $ucs && .comb ~~ $ucs.comb.Bag} }
}
}
stub: |-
sub match-anagrams (:$subject!, :@candidates!) is export {
}