Anonymous user
Cartesian product of two or more lists: Difference between revisions
Cartesian product of two or more lists (view source)
Revision as of 15:14, 6 August 2020
, 3 years ago→{{header|Tailspin}}: update syntax
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
|