Vocabularymath.statisticsInputs and outputsWord descriptionIterates over a sequence, allowing elements of the sequence to be added to a newly created
assoc. The
map-quot gets passed each element from the sequence. Its outputs are passed along with the assoc being constructed to the
insert-quot, which can modify the assoc in response.
Examples! Iterate over a sequence and increment the count at each element
! The first quotation has stack effect ( key -- key ), a no-op
USING: assocs prettyprint kernel math.statistics ;
"aaabc" [ ] [ inc-at ] H{ } sequence>assoc .
H{ { 97 3 } { 98 1 } { 99 1 } }
Definition