RosettaCodeData/Task/Function-frequency/Mathematica/function-frequency.math
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

1 line
151 B
Text

programCount[fn_] := Reverse[If[Length[#] > 10, Take[#, -10], #] &[SortBy[Tally[Cases[DownValues[fn], s_Symbol, \[Infinity], Heads -> True]], Last]]]