Cartesian product of two or more lists: Difference between revisions
Cartesian product of two or more lists (view source)
Revision as of 17:52, 8 November 2017
, 6 years agoadded a solution for Factor
(Added C implementation.) |
(added a solution for Factor) |
||
Line 486:
[]
[]</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}}==
|