Patrick R. Michaud |Perl 6| wrote:
It applies to any operator that has 'chain' associativity --
see S06, "Subroutine traits".

If I want to make my own chained operator, perhaps the curvy ≼, ≽, etc. or make my operator ≧ a synonym for >=, how would I tell the compiler that they belong to the same set of chained operators?

    sub infix:«≽» ($a, $b) is equiv(&infix:«>=») { ... }

Or, if you want to create your own chained precedence level
separate from the existing relational ops,
    sub infix:«≽» ($a, $b) is assoc<chain> is looser(...)  { ... }


Your answer is the opposite of Brandon's.

Reply via email to