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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.