Cartesian product of two or more lists: Difference between revisions

Content deleted Content added
m Minor code adjustment.
Line 2,159: Line 2,159:
var b = @['a', 'b']
var b = @['a', 'b']
var c = @[false, true]
var c = @[false, true]
let y = product(a, b, c)
echo &"{$$a} x {$$b} x {$$c} = {$$product(a, b, c)}"</lang>
echo &"{$$a} x {$$b} x {$$c} = {$$y}"</lang>


{{out}}
{{out}}