Overloaded operators: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) (→{{header|Raku}}: Add a Raku example) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: grammar) |
||
Line 158: | Line 158: | ||
Borrowed from the [[Nimber_arithmetic#Raku|Nimber arithmetic]] task: |
Borrowed from the [[Nimber_arithmetic#Raku|Nimber arithmetic]] task: |
||
New operators, defined in place. Arity is two (almost all infix operators |
New operators, defined in place. Arity is two (almost all infix operators |
||
take two arguments), precedence is set equivalent to similar existing operators, |
take two arguments), precedence is set equivalent to similar existing operators, |
||
default (right) associativity. The second, ⊗, actually uses itself to define |
default (right) associativity. The second, ⊗, actually uses itself to define |