cartesian-each ( ... seq1 seq2 quot: ( ... elt1 elt2 -- ... ) -- ... )
Factor handbook > The language > Collections > Sequence operations > Cartesian product operations

Next:cartesian-map ( ... seq1 seq2 quot: ( ... elt1 elt2 -- ... newelt ) -- ... newseq )


Vocabulary
sequences

Inputs and outputs
seq1a sequence
seq2a sequence
quota quotation with stack effect ( ... elt1 elt2 -- ... )


Word description
Applies the quotation to every possible pairing of elements from the two sequences.

Definition


: cartesian-each
( ... seq1 seq2 quot: ( ... elt1 elt2 -- ... ) -- ... )
[ with each ] 2curry each ; inline