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:D \aStr:D \b --> Order:D)
multi sub infix:<coll>(Cool:D \aCool:D \b --> Order:D)
multi sub infix:<coll>(Pair:D \aPair:D \b --> Order:D)

coll is a sorting operator that takes pairs of Strs, Cools or Pairs 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.