Vocabulary
sequences

Inputs
seq1a sequence
seq2a sequence


Outputs
newseqa new sequence of sequences of pairs


Word description
Outputs a sequence of all possible pairings of elements from the two sequences, using the type of seq2.

Examples
USING: prettyprint sequences ; { 1 2 } { 3 4 } cartesian-product .
{ { { 1 3 } { 1 4 } } { { 2 3 } { 2 4 } } }

USING: prettyprint sequences ; "abc" "def" cartesian-product .
{ { "ad" "ae" "af" } { "bd" "be" "bf" } { "cd" "ce" "cf" } }


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

Definition