Documentation for infix X

Documentation for infix X, assembled from the following types:

language documentation Operators

From Operators

(Operators) infix X

sub infix:<X>(**@lists --> List:D)

Creates a cross product from all the lists, order so that the rightmost elements vary most rapidly:

1..3 X <a b c> X 9
# produces ((1 a 9) (1 b 9) (1 c 9) 
#           (2 a 9) (2 b 9) (2 c 9) 
#           (3 a 9) (3 b 9) (3 c 9)) 

The X operator also exists as a meta operator, in which case the inner lists are replaced by the value from applying the operator to the list:

1..3 X~ <a b c> X~ 9
# produces (1a9 1b9 1c9 2a9 2b9 2c9 3a9 3b9 3c9)