New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lines() isn't lazy in Rakudo #2742
Comments
From @masak<tadzik> r: for $*IN.lines -> $line { say $line.lc } |
From @pmichaudOn Tue, May 01, 2012 at 09:11:22AM -0700, Carl Mäsak wrote:
Actually, as implemented lines() is already "lazy": pmichaud@kiwi:~/p6/rakudo$ ./perl6 The problem is actually in the .map code itself (I suspect > @a[3] The problem line is in src/core/MapIter.pm: my This causes all of the requested elements of the source $!list to The correct approach is to make .munch sufficiently performant Pm |
The RT System itself - Status changed from 'new' to 'open' |
From @ronaldxsSee from IRC http://irclog.perlgeek.de/perl6/2012-06-18#i_5738718 A test might look something like the code below which currently results use Test; my $i = 0; |
From @ronaldxsOn second thought a simpler and better test might be: use Test; my $i = 0; |
From @pmichaudOn Thu May 03 01:53:21 2012, pmichaud wrote:
Although I've improved MapIter so that it's appropriately lazy, Pm |
From @ronaldxsOn Sun Jul 01 09:53:36 2012, pmichaud wrote:
Re-tested with a recent rakudo build and it looks like the examples work. Wondering if we can't close this one. Ron Schmidt |
From @ronaldxsAfter chatting with Masak on IRC I am updating the ticket again. There is an existing test in https://github.com/perl6/roast/blob/master/S04-statements/gather.t That seems to me to cover the same ground as the 10, 20, 30, 40 example. The test is: # lazy gather So I don't know if or how one ads the *IN example to testing but I believe the 10, 20, 30, 40 test is already in. Thanks, |
From @ninerTest added in roast commit eaaec7af0a924fd14e97bf24ccb71e458d19f439 |
@niner - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#112716 (status was 'resolved')
Searchable as RT112716$
The text was updated successfully, but these errors were encountered: