Function frequency: Difference between revisions
m
→{{header|Sidef}}: updated code
(Added a Perl section.) |
m (→{{header|Sidef}}: updated code) |
||
Line 1,802:
=={{header|Sidef}}==
Sidef provides full access to its parser, allowing us to inspect all the declarations within a program.
<lang ruby>
func bar { }
foo(); foo(); foo()
bar(); bar();
▲var data = Perl.to_sidef(parser{:vars}{:main}).flatten
data.sort_by { |v| -v{:count} }.first(10).each { |entry|
|