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

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


Vocabulary
assocs

Inputs
keysa sequence
valuesa sequence


Outputs
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, zip-with, zip-with-as

Definition

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