Function frequency: Difference between revisions

(→‎{{header|REXX}}: added/changed whitespace and comments, add aligned numbers via computation of width, made the frequency counter more idiomatic.)
Line 791:
mouseUp 2</lang>
 
=={{header|Mathematica}} / {{header|Wolfram Language}}==
<lang Mathematica>programCount[fn_] := Reverse[If[Length[#] > 10, Take[#, -10], #] &[SortBy[Tally[Cases[DownValues[fn], s_Symbol, \[Infinity], Heads -> True]], Last]]]</lang>
{{out}}The output of applying this program to itself...<pre>programCount[programCount]
Anonymous user