zip ( keys values -- alist )
Factor handbook > The language > Collections > Associative mapping operations > Associative mapping conversions

Prev:assoc-combine ( seq -- union )
Next:zip-as ( keys values exemplar -- assoc )


Vocabulary
assocs

Inputs and outputs
keysa sequence
valuesa sequence
alistan array of key/value pairs


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

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


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

Definition

: zip ( keys values -- alist ) { } zip-as ; inline