up previous next
Distrib

the distribution of objects in a list
Syntax

Distrib(L:LIST):LIST


Description
For each object E of a list L, let N(E) be the number of times E occurs as a component of L. Then Distrib(L) returns the list whose components are [E, N(E)].

Example
  Distrib(["b","a","b",4,4,[1,2]]);
[["b", 2], ["a", 1], [4, 2], [[1, 2], 1]]
-------------------------------


See Also