sorted-histogram ( seq -- alist )
Statistics > Computing histograms

Prev:histogram! ( hashtable seq -- hashtable )


Vocabulary
math.statistics

Inputs and outputs
seqa sequence
alistan array of key/value pairs


Word description
Outputs a histogram of a sequence sorted by number of occurrences from lowest to highest.

Examples
USING: prettyprint math.statistics ; "abababbbbbbc" sorted-histogram .
{ { 99 1 } { 97 3 } { 98 8 } }


Definition