Cartesian product of two or more lists: Difference between revisions
Content deleted Content added
m →{{header|Tailspin}}: update syntax |
|||
Line 3,390:
templates cartesianProduct
{ product: [$(1)... -> [$]], rest: $(2..last) } -> #
when <{ rest: <[](0)> }> do $.product !
{ product: [$.product... -> \(def n: $; $m... -> [$n..., $] !\)], rest: $.rest(2..last) } -> #
end cartesianProduct
|