RosettaCodeData/Task/Function-frequency/Mathematica/function-frequency.math
2023-07-01 13:44:08 -04: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]]]