VocabularysequencesInputsOutputsnewseq | a new sequence of sequences of pairs |
Word descriptionOutputs a sequence of all possible pairings of elements from the two sequences, using the type of
seq2.
ExamplesUSING: 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 alsocartesian-find,
cartesian-each,
cartesian-map,
cartesian-product-asDefinition