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)
Is this page unclear, or have you spotted an error? Please add a comment below and help us to improve it. For all other questions and remarks, visit ask.rascal-mpl.org.