infix coll
1 | language documentation Operators |
1.1 | (Operators) infix coll |
Documentation for infix coll
assembled from the following types:
language documentation Operators
From Operators
(Operators) infix coll
Defined as:
multi sub infix:<coll>(Str \a, Str \b --> Order)multi sub infix:<coll>(Cool \a, Cool \b --> Order)multi sub infix:<coll>(Pair \a, Pair \b --> Order)
coll
is a sorting operator that takes pairs of Str
s, Cool
s or Pair
s and returns an Order
that uses the $*COLLATION
order. The default behavior disregards diacritic marks and capitalization, for instance.
say "b" cmp "à"; # OUTPUT: «Less»say "b" coll "à"; # OUTPUT: «More»
In the first case, lexicographic or codepoint order is taken into account. In the second, which uses coll
, the diacritic is not considered and sorting happens according to intuitive order.
NOTE: These are not yet implemented in the JVM.