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

Prev:map>assoc ( ... seq quot: ( ... elt -- ... key value ) exemplar -- ... assoc )
Next:assoc>map ( ... assoc quot: ( ... key value -- ... elt ) exemplar -- ... seq )


Vocabulary
assocs

Inputs
seqa sequence
quota quotation with stack effect ( ... elt -- ... key value )


Outputs
alista new alist


Word description
Applies the quotation to each element of the sequence, and collects the keys and values into a new alist.

See also
map>assoc

Definition

: map>alist
( ... seq quot: ( ... elt -- ... key value ) -- ... alist )
{ } map>assoc ; inline