RosettaCodeData/Task/Function-frequency/Perl-6/function-frequency.pl6

8 lines
166 B
Raku
Raw Permalink Normal View History

2014-01-17 05:32:22 +00:00
my $text = qqx[perl6 --target=ast @*ARGS[]];
my %fun;
for $text.lines {
%fun{$0}++ if / '(call &' (.*?) ')' /
}
for %fun.invert.sort.reverse[^10] { .value.say }