Anagram generator: Difference between revisions

m
(→‎{{header|Raku}}: Add missing word, Made dictionary used a command line directive)
m (→‎{{header|Raku}}: Unicode FTW)
Line 58:
 
sub find-anagram (%subset, $phrase is copy = '', $last = Inf) {
my $remain = $bag (-) $phrase.comb(/\w/).Bag; # Find the remaining letters
my %filtered = %subset.grep: { .value ⊆ $remain }; # Find words using the remaining letters
my $sofar = +$phrase.comb(/\w/); # Get the count of the letters used so far
10,327

edits