Cartesian product of two or more lists: Difference between revisions
m
→{{header|langur}}
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 2,028:
[[File:Fōrmulæ - Cartesian product of two or more lists 03.png]]
[[File:Fōrmulæ - Cartesian product of two or more lists
'''Test case 2.''' With an empty list
Line 2,034:
[[File:Fōrmulæ - Cartesian product of two or more lists 05.png]]
[[File:Fōrmulæ - Empty list
[[File:Fōrmulæ - Cartesian product of two or more lists 06.png]]
[[File:Fōrmulæ - Empty list
'''Test case 3.''' Extra credit. n-ary cartesian product
Line 2,044:
[[File:Fōrmulæ - Cartesian product of two or more lists 07.png]]
[[File:Fōrmulæ - Cartesian product of two or more lists
[[File:Fōrmulæ - Cartesian product of two or more lists 09.png]]
[[File:Fōrmulæ - Cartesian product of two or more lists
[[File:Fōrmulæ - Cartesian product of two or more lists 11.png]]
[[File:Fōrmulæ - Empty list
=={{header|Go}}==
Line 2,996:
</pre>
=={{header|langur}}==
<syntaxhighlight lang="langur">val .X =
writeln mapX(.X, [1, 2], [3, 4]) == [[1, 3], [1, 4], [2, 3], [2, 4]]
|