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 and outputs
keysa sequence
valuesa sequence
exemplara sequence
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.

Notes
Exemplar must be a sequence type; hashtables will not work yet.

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


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

Definition