Cartesian product of two or more lists: Difference between revisions

Content added Content deleted
(Added C implementation.)
(added a solution for Factor)
Line 486: Line 486:
[]
[]
[]</pre>
[]</pre>

=={{header|Factor}}==
<lang Factor>IN: scratchpad { 1 2 } { 3 4 } cartesian-product .
{ { { 1 3 } { 1 4 } } { { 2 3 } { 2 4 } } }
IN: scratchpad { 3 4 } { 1 2 } cartesian-product .
{ { { 3 1 } { 3 2 } } { { 4 1 } { 4 2 } } }
IN: scratchpad { 1 2 } { } cartesian-product .
{ { } { } }
IN: scratchpad { } { 1 2 } cartesian-product .
{ }</lang>


=={{header|Go}}==
=={{header|Go}}==