in reply to Re: [+] on a list... with a Junction
in thread [Perl6] [+] on a list... with a Junction

Thank you for the mention and the bug fix. I was waiting to get back to my computer to write up the bug report (something, something, work computer, personal email).

I'm not yet familiar enough with the code base to be certain, but I wonder if that change will resolve the tangential bug(?) of say [+] (1, 2|3, 4); (does it do magic to map [+] to .sum?)

Replies are listed 'Best First'.
Re^3: [Perl6] [+] on a list... with a Junction
by Zoffix (Acolyte) on Nov 25, 2016 at 19:42 UTC
    Yeah, that is fixed as well. The [+] metaop is special-cased to become sum() since it's pretty common and we have other optimizations for .sum, like the one on Range objects for example:

    say sum 1..999999999999999999999999999; # 499999999999999999999999999500000000000000000000000000