[perl #130572] Parenthesized `for` loop is eager, even with `lazy` keyword

2019-05-12 Thread Jan-Olof Hendig via RT
On Sat, 26 Aug 2017 05:15:41 -0700, sml...@gmail.com wrote:
> This bug is still present in
> 
> Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 2017.08.1-
> 19-g151a2563
> implementing Perl 6.c

As per commit 
https://github.com/rakudo/rakudo/commit/cf1673d9c20e82aad6291a8aa123c46e177edf34
the second case now works as intended.



[perl #130572] Parenthesized `for` loop is eager, even with `lazy` keyword

2017-08-26 Thread Sam S. via RT
This bug is still present in

Rakudo version 2017.08-8-g753c9a5ea built on MoarVM version 
2017.08.1-19-g151a2563
implementing Perl 6.c.



[perl #130572] Parenthesized `for` loop is eager, even with `lazy` keyword

2017-01-17 Thread via RT
# New Ticket Created by  Sam S. 
# Please include the string:  [perl #130572]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/Ticket/Display.html?id=130572 >


➜  say (for ^4 { .say }).WHAT;
0
1
2
3
(List)

➜  say (lazy for ^4 { .say }).WHAT;
0
1
2
3
(Seq)

I would have expected an output of just `(Seq)` in both cases, or at
least in the second case.

The synopses don't seem to make a statement on whether a `List` or
`Seq` should be returned, but S04 is quite clear that both should be
lazy :

lazy loops can be indicated by putting the loop in parens
or brackets:

   (... if COND for LIST)  # lazy list comprehension
   [for LIST { ... }]
(loop { ... })

or by use of either a statement prefix or a phaser in
statement form:

   lazy for LIST { ... }
   ENTER for LIST { ... }

According to bisectable and committable
, Rakudo has
always done it like it does now, though.

---
This is Rakudo version 2016.12-315-gdaf7e5185 built on MoarVM version
2016.12-113-gd1da1bac
implementing Perl 6.c.