In Operators§
See primary documentation in context for infix xx
multi infix:<xx>()multi infix:<xx>(Mu \x)multi infix:<xx>(, Num() )multi infix:<xx>(, Whatever)multi infix:<xx>(, Bool )multi infix:<xx>(, Int )multi infix:<xx>(Mu \x, Num() )multi infix:<xx>(Mu \x, Whatever)multi infix:<xx>(Mu \x, Bool )multi infix:<xx>(Mu \x, Int )
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 [1, 2] xx 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
.