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
Open Source Projects |
Rakudo Perl 6 Confessions of an open source project leader |
#98 |
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 © 2009 http://www.pmichaud.com/2009/pres/ |