zip-as ( keys values exemplar -- assoc )
Factor handbook » The language » Collections » Associative mapping operations » Associative mapping conversions

Prev:zip ( keys values -- alist )
Next:zip-index ( values -- alist )


Vocabulary
assocs

Inputs
keysa sequence
valuesa sequence
exemplara sequence


Outputs
assoca sequence of key/value pairs of type exemplar


Word description
Combines two sequences pairwise into a single sequence of key/value pairs of type exemplar.

Examples
USING: prettyprint assocs ; { 1 2 3 } { 4 5 6 } V{ } zip-as .
V{ { 1 4 } { 2 5 } { 3 6 } }


USING: prettyprint assocs ; { 1 2 3 } { 4 5 6 } H{ } zip-as .
H{ { 1 4 } { 2 5 } { 3 6 } }


See also
unzip, zip, zip-index, zip-index-as, zip-with, zip-with-as

Definition