Isograms and heterograms: Difference between revisions
m
→{{header|Raku}}: concurrency
Thundergnat (talk | contribs) (→{{header|Raku}}: Add a Raku example) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: concurrency) |
||
Line 140:
<lang perl6>my $file = 'unixdict.txt';
my @words = $file.IO.slurp.words.race.map: { $_ => .comb.Bag };
.say for (6...2).map: -> $n {
next unless my @iso = @words.race.grep({.value.values.all == $n})
}
Line 151:
say "\n({+$_}) heterograms with $minchars or more characters:\n" ~
.sort({[-.chars, ~$_]}).join: "\n" given
@words.race.grep({.key.chars >$minchars && .value.values.max == 1})».key;</lang>
{{out}}
<pre>(2) 3-isograms:
|