Re: How do you do a lazy map?

2008-09-07 Thread John M. Dlugosz
Moritz Lenz moritz-at-casella.verplant.org |Perl 6| wrote: map *is* lazy, as are all list builtins that can be lazy (which doesn't include stuff like sort, which has to look at all items anyway). Are you sure that it doesn't imply order of evaluation by default? I'm all for it (to be diff

Re: How do you do a lazy map?

2008-09-07 Thread Moritz Lenz
John M. Dlugosz wrote: > Consider something like a 'map' call, only I want it to be lazy. map *is* lazy, as are all list builtins that can be lazy (which doesn't include stuff like sort, which has to look at all items anyway). > I know that a > list can contain internally iterators that generat

How do you do a lazy map?

2008-09-07 Thread John M. Dlugosz
Consider something like a 'map' call, only I want it to be lazy. I know that a list can contain internally iterators that generate elements as needed or perhaps in the background. But how do you create such a thing? Something like: @lazy_list := parallel-map { get_info($_) } @filenames;

Re: What happened to "err" operator?

2008-09-07 Thread John M. Dlugosz
TSa (Thomas Sandlaß) thomas-at-sandlass.de |Perl 6| wrote: a() proceed: orelse b(); CATCH { ... # make $! into return value goto proceed; } This kind of needs to know the variable the return value of a() is stored into. This is easy if orelse is checking $! anyway. But do

Re: What happened to "err" operator?

2008-09-07 Thread Dr.Ruud
"TSa (Thomas Sandlaß)" schreef: > Larry Wall: >> Another potential issue is that CATCH doesn't distinguish exceptions >> coming from the current block from those coming from the subcall to >> a(). So it could end up returning Failure from the current block when >> you intended to force return of F

Re: What happened to "err" operator?

2008-09-07 Thread TSa (Thomas Sandlaß)
HaloO, On Thursday, 4. September 2008 03:39:20 Larry Wall wrote: > Another potential issue is that CATCH doesn't distinguish exceptions > coming from the current block from those coming from the subcall to a(). > So it could end up returning Failure from the current block when > you intended to fo

List.uniq

2008-09-07 Thread Moritz Lenz
There are some tests for List.uniq in the test suite, and pugs implements it, but it's not in S29. Damian seems to have though we should have it: http://groups.google.com/group/perl.perl6.language/msg/4c8c9bd73c862bed So should we have it? If not, I'll replace the tests with eval_dies_ok('(1, 2).