Certainly, but the point is that Perl 6 is going to make laziness possible and convenient, not that it will magically change unlazy algorithms to be such.
I appreciate the explanation that gather/take allow laziness. Thank you (didn't you see my upvote?). After learing that, I moved on to wonder at something more specific...
My point (directly above) was that I'd like to see a reasonable implementation that actually makes using gather/take actually worth using, that actually demonstrates the advantage (actually). It would even be great if that demonstration also showed how easy / natural it is to do that in Perl6 syntax.
I think I'm (partially) with Perl Mouse in trying to understand the point of this thread in regard to Perl6. So far, it appears to be showing that Perl6 allows alternate syntax which is longer and might support laziness except that it might not by default and nobody has yet been able to demonstrate how to actually support laziness fully; and perhaps that means that Perl6 doesn't support laziness very well since it appears (so far) to make laziness difficult enough that nobody has achieved it.
I'd be happy to see a version that takes a list of lazy lists and returns a lazy list of lists, and does it without defeating most of the purpose of laziness and (I hope) demonstrates a somewhat natural syntax. I'd also be happy to see a version that takes a lazy list of lazy lists and returns a lazy list of lazy lists, especially if it provided an interesting comparison to the former.
- tye
In reply to Re^5: cross combinations (lazy)
by tye
in thread cross combinations
by jql
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |