# New Ticket Created by "Carl Mäsak" # Please include the string: [perl #61610] # in the subject line of all future correspondence about this issue. # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61610 >
<moritz_> rakudo: say (1..10).reduce({$^a + $^b + $^c}) <p6eval> rakudo 34244: OUTPUT[Use of uninitialized value55] <PerlJam> that's interesting * PerlJam is looking at the code now <masak> PerlJam: are you also submitting a rakudobug? otherwise I am. <PerlJam> go ahead * masak submits rakudobug <eric256> whats the bug? <masak> eric256: the "Use of uninitialized value" warning above. <moritz_> masak: maybe that's because it just doesn't work to reduce a list of every possible size with a three-arg function? <eric256> but it was unitiliazed <masak> moritz_: yes, now that I look at it, I think so too. <masak> eric256: what was? <PerlJam> still a bug though <PerlJam> (IMHO) <eric256> $^b and $^c for the last run <masak> PerlJam: aye, it shouldn't warn, methinks <masak> eric256: you're right. <PerlJam> yeah, it pushes an appropriate number of undef to fill out the arity of the sub. <eric256> rakudo: list(1).reduce( { $^a.say; $^b.say;}); <p6eval> rakudo 34244: RESULT[1] <rjh-> how else would you handle it? <eric256> ohh but that should have the same error then <eric256> rakudo: list(1).reduce( { $^a + $^b;}); <p6eval> rakudo 34244: RESULT[1] <eric256> rakudo: list(1).reduce( { $^a + $^b + $^c;}); <p6eval> rakudo 34244: RESULT[1] <eric256> rakudo: list(1,2).reduce( { $^a + $^b + $^c;}); <p6eval> rakudo 34244: OUTPUT[Use of uninitialized value] <eric256> okay thats a bit weird <masak> something inconsistent is going on.