Re: Justification for the "reversed" instruction format

[email protected] (Aaron Sherman) Tue, 6 Sep 2016 12:51:45 -0400
Newsgroups perl.perl6.language
Message-ID <CAN=dS7QJU-K+EbTZvdjWcSq5b62vDauVRsES3yL+n7e6-ANHSQ@mail.gmail.com>
$ perl6 -e 'my @numbers = 1..100; say [-] @numbers; say [R-] @numbers'
-5048
-4850

In general, it's kind of pointless with bare infix ops, as you can just
reverse the arguments, but when reducing or the like, it becomes much more
valuable.



On Tue, Sep 6, 2016 at 12:43 PM, Parrot Raiser <[email protected]> wrote:

> I've just stumbled across "reversed operators", e.g. say 4 R/ 12; # 3
> in the documentation. I'm curious to know why the language includes
> them? I'm having trouble understanding where they would be useful.
>