Function frequency: Difference between revisions

→‎{{header|Raku}}: Fix code and comments: Perl 6 --> Raku
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(→‎{{header|Raku}}: Fix code and comments: Perl 6 --> Raku)
Line 1,335:
=={{header|Raku}}==
(formerly Perl 6)
Here we just examine the ast of the Perl 6Raku compiler (which is written in Perl 6Raku) to look for function calls.
<lang perl6>my $text = qqx[perl6raku --target=ast @*ARGS[]];
my %fun;
for $text.lines {
Line 1,344:
for %fun.invert.sort.reverse[^10] { .value.say }</lang>
{{out}}
Here we run it on the strand sort RC entry. Note how Perl 6Raku considers various operators to really be function calls underneath.
<pre>$ ./morefun strand
pop
2,392

edits