sub infix:<cmp>

Documentation for sub infix:<cmp> assembled from the following types:

class Range

From Range

(Range) sub infix:<cmp>

multi sub infix:<cmp>(Range:D \aRange:D \b --> Order:D)
multi sub infix:<cmp>(Num(Real) \aRange:D \b --> Order:D)
multi sub infix:<cmp>(Range:D \aNum(Real) \b --> Order:D)
multi sub infix:<cmp>(Positional \aRange:D \b --> Order:D)
multi sub infix:<cmp>(Range:D \aPositional \b --> Order:D)

Compares two Range objects. If you use a Real, it will be compared to the Range b..b. If you use a Positional|/type/Positional>.

say (1..2cmp (1..2); # OUTPUT: «Same␤» 
say (1..2cmp (1..3); # OUTPUT: «Less␤» 
say (1..4cmp (1..3); # OUTPUT: «More␤» 
say (1..2cmp 3;      # OUTPUT: «Less␤» 
say (1..2cmp [1,2];  # OUTPUT: «Same␤»