Open p6rt opened 8 years ago
\
\
I've been looking into this and just got some clarification from TimToady on expected behaviour for adverbs and chains in general ( http://irclog.perlgeek.de/perl6/2016-06-02#i_12589974). The gist is that adverbs should be placed at the end of a chain and then distributed to all the operators in the chain, which will of course make the example in this ticket "just work".
Dan
The RT System itself - Status changed from 'new' to 'open'
It seems that it is possible adverb custom operators, e.g.
perl6 -e 'sub infix:\<~>($x,$y,:$z) { say "$x $y $z" }; 1 ~ 2 :z(12)'
1 2 12
However, when these are chained, the adverb is not distributed
perl6 -e 'sub infix:\<~>($x,$y,:$z) { say [$x,$y,$z].perl; 9 }; 1 ~ 2 ~~~ 3 :z(12)'
[1, 2, Any]
[9, 3, 12]
So, if adverbs are made to distribute across infix operators in general then I suppose this existing behavior would change.
Migrated from rt.perl.org#128210 (status was 'open')
Searchable as RT128210$