In Operators§

See primary documentation in context for infix xx

multi sub infix:<xx>()
multi sub infix:<xx>(Mu \x)
multi sub infix:<xx>(&xNum:D() $n)
multi sub infix:<xx>(&xWhatever)
multi sub infix:<xx>(&xBool:D $b)
multi sub infix:<xx>(&xInt:D $n)
multi sub infix:<xx>(Mu \xNum:D() $n)
multi sub infix:<xx>(Mu \xWhatever)
multi sub infix:<xx>(Mu \xBool:D $b)
multi sub infix:<xx>(Mu \xInt:D $n)

List repetition operator

In general, it returns a Sequence of $a repeated and evaluated $b times ($b is coerced to Int). If $b <= 0, the empty list is returned. It will return an error with no operand, and return the operand itself with a single operand. An exception X::Numeric::CannotConvert will be thrown if $b is -Inf or NaN.

The left-hand side is evaluated for each repetition, so

say [12xx 5;
# OUTPUT: «([1 2] [1 2] [1 2] [1 2] [1 2])␤»

returns five distinct arrays (but with the same content each time), and

rand xx 3

returns three pseudo random numbers that are determined independently.

The right-hand side can be *, in which case a lazy, infinite list is returned. If it's a Bool, a Seq with a single element is returned if it's True.