The cross (X) meta-operator
The X prefix can also be used on any infix operator to make it "cross":
> my @a = <2 3 5>; > my @b = <10 12>; > .say for @a X* @b; # (2*10, 2*12, 3*10, 3*12, ... ) 20 24 30 36 50 60
Perl 6 | Perl 6 today | #35 |
The cross (X) meta-operator
The X prefix can also be used on any infix operator to make it "cross":
> my @a = <2 3 5>; > my @b = <10 12>; > .say for @a X* @b; # (2*10, 2*12, 3*10, 3*12, ... ) 20 24 30 36 50 60
Copyright © 2009 http://www.pmichaud.com/2009/pres/ |