assoc>map ( ... assoc quot: ( ... key value -- ... elt ) exemplar -- ... seq )
Factor handbook > The language > Collections > Associative mapping operations > Associative mapping combinators

Prev:map>alist ( ... seq quot: ( ... elt -- ... key value ) -- ... alist )
Next:assoc-map-as ( ... assoc quot: ( ... key value -- ... newkey newvalue ) exemplar -- ... newassoc )


Vocabulary
assocs

Inputs and outputs
assocan assoc
quota quotation with stack effect ( ... key value -- ... elt )
exemplara sequence
seqa new sequence


Word description
Applies the quotation to each entry of the assoc and collects the results into a new sequence of the same type as the exemplar.

Definition


: assoc>map
( ... assoc quot: ( ... key value -- ... elt ) exemplar -- ... seq )
[ (assoc-each) ] dip map-as ; inline