In DateTime§
See primary documentation in context for sub infix:<cmp>.
multi infix:<cmp>(DateTime:D \a, DateTime:D \b --> Order:D)
Compares the equivalent instant, returns the Order.
In Range§
See primary documentation in context for sub infix:<cmp>.
multi infix:<cmp>(Range:D \a, Range:D \b --> Order:D) multi infix:<cmp>(Num(Real) \a, Range:D \b --> Order:D) multi infix:<cmp>(Range:D \a, Num(Real) \b --> Order:D) multi infix:<cmp>(Positional \a, Range:D \b --> Order:D) multi infix:<cmp>(Range:D \a, Positional \b --> Order:D)
Compares two Range
objects. A Real
operand will be considered as both the starting point and the ending point of a Range
to be compared with the other operand. A Positional
operand will be compared with the list returned by the .list
method applied to the other operand. See List infix:<cmp>
say (1..2) cmp (1..2); # OUTPUT: «Same» say (1..2) cmp (1..3); # OUTPUT: «Less» say (1..4) cmp (1..3); # OUTPUT: «More» say (1..2) cmp 3; # OUTPUT: «Less» say (1..2) cmp [1,2]; # OUTPUT: «Same»