![]() |
|
Navigation |
Synopsis Get the distribution of the elements of the list. That
is how often does each element occur in the list?
Function
map[&T element, int occurs] distribution(list[&T] lst)
Usage
import List;
Examples
rascal>import List; ok rascal>distribution([4,4,4,3,1,2,1,1,3,4]); map[int element, int occurs]: (1:3,2:1,3:2,4:4) ![]() |