Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
reduce metaop of hyper metaop only works with two or more elements in Rakudo #3475
<timotimo> m: my @a = $(1, 2, 3); say [>>+<<] @a;
I think I agree that this is a bug, with the following reasoning: [+]
Similarly, [>>+<<] is also a kind of sum: in this case, it is summing
In that vein, the 0-elem case should also work:
<masak> m: my @a; say [>>+<<] @a
On Tue, 05 Aug 2014 14:27:17 -0700, masak wrote:
The 1-element case was fixed in rakudo/rakudo@6b3930e.
The 0-element case doesn't die on rakudo-j, but doesn't return anything at all.
[21:25] <MasterDuke_> j: my @a; dd [>>+<<] @a
Tests added in perl6/roast@1244df8