enum Order

<p id="1c3eccc">Human readable form for comparison operators. <span class="indexed" id="index-entry-"></span><span class="indexed" id="index-entry-_0"></span><span class="indexed" id="index-entry-_0"></span> </p>

enum Order (:Less(-1), :Same(0), :More(1));

Operators§

infix cmp§

multi infix:<cmp>(\a, \b --> Order:D)

cmp will first try to compare operands as strings (via coercion to Stringy), and, failing that, will try to compare numerically via the <=> operator or any other type-appropriate comparison operator. See also the documentation for the cmp operator.

infix <=>§

multi infix:«<=>»(Int:D \a, Int:D \b --> Order:D)

Specialized form for Int.