cartesian-product-as ( seq1 seq2 exemplar -- newseq )
Factor handbook » The language » Collections » Sequence operations » Cartesian product operations

Prev:cartesian-product ( seq1 seq2 -- newseq )


Vocabulary
sequences

Inputs
seq1a sequence
seq2a sequence
exemplara sequence


Outputs
newseqa new sequence of sequences of pairs


Word description
Outputs a sequence of all possible pairings of elements from the two sequences so that the output sequence is the exemplar's type.

Examples
USING: bit-arrays prettyprint sequences ; "ab" ?{ t f } { } cartesian-product-as .
{ { { 97 t } { 97 f } } { { 98 t } { 98 f } } }


See also
cartesian-find, cartesian-each, cartesian-map, cartesian-product

Definition