Cartesian product of two or more lists: Difference between revisions

Content added Content deleted
m (→‎version 1: added wording to the REXX header section.)
Line 34: Line 34:
print(cart_prod([1, 2], [3, 4]))
print(cart_prod([1, 2], [3, 4]))
print(cart_prod([3, 4], [1, 2]))
print(cart_prod([3, 4], [1, 2]))
[Int] empty_list
print(cart_prod([1, 2], []))
print(cart_prod([], [1, 2]))</lang>
print(cart_prod([1, 2], empty_list))
print(cart_prod(empty_list, [1, 2]))</lang>
====Alternative version====
====Alternative version====
<lang 11l>F cart_prod(a, b)
<lang 11l>F cart_prod(a, b)