On 2010 Mar 23, at 9:28 PM, Per Vognsen wrote:
So you can see that scan-filter-zip is lazy in the source sequence but
apparently not the primary input sequence. That was surprising to me
because I see nothing in my code that should have forced that. Then I
remember that some functions like range are not really lazy but only
chunky-lazy. You can verify this by replacing (range 10) by (range
100) and noting that the trace stops at the 32nd element (chunks are
currently 32 elements wide). So, everything is as lazy as can be,
given the input sequences.

Thanks!

When I replaced range with (take 10 (iterate inc 100)) trace-seq
showed no chunking. I guess range is generating cheap enough sequences that the chunking is worth it. :)

-Doug

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

To unsubscribe from this group, send email to clojure+unsubscribegooglegroups.com or 
reply to this email with the words "REMOVE ME" as the subject.

Reply via email to