Re: Delegation

2021-11-26 Thread Elizabeth Mattijsen
By the way: if you override an operator, you can still access the original one using CORE:: sub infix:<+>($,$) { 42 } say 200 + 300; # 42 say infix:<+>(200,300); # 42 say ::infix:<+>(200,300); # 500 > On 26 Nov 2021, at 20:30, rir wrote: > > Wow, that

Re: Delegation

2021-11-26 Thread Elizabeth Mattijsen
You mean like: say :<+>(has 42,137); # 179 ?? If so, by referring to its full name :-) > On 26 Nov 2021, at 15:07, rir wrote: > > Is it possible to to delegate plain or overridden operators? If so, > what does the syntax look like? > > Rob

Delegation

2021-11-26 Thread rir
Is it possible to to delegate plain or overridden operators? If so, what does the syntax look like? Rob

delegation

2015-10-07 Thread mt1957
Hi, According to synopsis 12 I could defer methods to methods in another object. The case in which one can map some name into another didn't work out. * ** **class A {** ** method say-i (Int $i ) { say "I: $i"; }** **}** ** **class B {** ** has A $.n handles { :x };** ** ** submethod BUILD {