Cartesian product of two or more lists: Difference between revisions

Content added Content deleted
m (→‎{{header|Tailspin}}: syntax update)
Line 3,321: Line 3,321:
<{ rest: <[](0)> }> $.product !
<{ rest: <[](0)> }> $.product !
<> def m: $.rest(1);
<> def m: $.rest(1);
{ product: [$.product... -> (def n: $; $m... -> [$n..., $] !)], rest: $.rest(2..-1) } -> #
{ product: [$.product... -> \(def n: $; $m... -> [$n..., $] !\)], rest: $.rest(2..-1) } -> #
end cartesianProduct
end cartesianProduct