histogram! ( hashtable seq -- hashtable ) (original) (raw)

Vocabulary
math.statistics

Inputs

hashtable a hashtable
seq a sequence

Outputs

hashtable a hashtable

Word description
Takes an existing hashtable and uses histogram to continue counting the number of occurrences of each element.

Examples

! Count the number of times the elements of two sequences appear. USING: prettyprint math.statistics ; "aaabc" histogram "aaaaaabc" histogram! .
H{ { 97 9 } { 98 2 } { 99 2 } }

Definition

IN: math.statistics

: histogram! ( hashtable seq -- hashtable )
[ ] histogram-by! ; inline