develooper Front page | perl.perl6.compiler | Postings from June 2010

[perl #76110] [BUG] Nested triangular reduce produces empty list

From:
Moritz Lenz
Date:
June 28, 2010 03:13
Subject:
[perl #76110] [BUG] Nested triangular reduce produces empty list
Message ID:
rt-3.6.HEAD-4976-1277538269-74.76110-82-0@perl.org
# New Ticket Created by  Moritz Lenz 
# Please include the string:  [perl #76110]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=76110 >


09:33 < tylercurtis> rakudo: say [\+] [\+] 1 xx 5
09:33 < p6eval> rakudo ea8f2b:  ( no output )

doesn't work :(

09:33 < tylercurtis> pugs: say [\+] [\+] 1 xx 5
09:33 < p6eval> pugs: OUTPUT«1361015␤»

Yep, pugs gets it right

09:35 <@moritz_> rakudo: say ([\+] 1 xx 5).perl
09:35 < p6eval> rakudo ea8f2b: OUTPUT«(1, 2, 3, 4, 5)␤»

first one still works...

09:35 <@moritz_> rakudo: say ([\+] ([\+] 1 xx 5)).perl
09:35 < p6eval> rakudo ea8f2b: OUTPUT«()␤»

Nesting doesn't. Doesn't seem to be a precedence problem.

09:36 < tylercurtis> rakudo: say ([\+] [[\+] 1 xx 5])
09:36 < p6eval> rakudo ea8f2b: OUTPUT«1361015␤»

Aha. over-eager argument flattening somewhere?


-- 
Moritz Lenz
http://perlgeek.de/ |  http://perl-6.de/ | http://sudokugarden.de/



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About