The cross (X) operator
The X operator produces all of the permutations of two or more lists
my @a = <a b c>; my @b = <1 2>; say ~(@a X @b)
produces:
a 1 a 2 b 1 b 2 c 1 c 2
Perl 6 | Cool Perl 6 | #63 |
The X operator produces all of the permutations of two or more lists
my @a = <a b c>; my @b = <1 2>; say ~(@a X @b)
produces:
a 1 a 2 b 1 b 2 c 1 c 2
Copyright © 2010 http://www.pmichaud.com/2010/pres/ |