Hi,

this highly depends on the sequence function at hand. Usually they are 
guaranteed to be as lazy as possible. But the are two aspects: a) sometimes 
you need to look ahead to actually perform the action (eg. take-while or 
drop-while) and b) sometimes there might be a bug in the implementation and 
it is not as lazy as it could be. You can't do anything about a). And b) is 
very unlikely but also happened in the past.

A bigger problem might be ChunkedSequences. Assume you have your promises 
in a vector. Then a (map deref ...) will deref ahead of the actually 
requested elements and you have to deliver on up to 32 promises to unblock 
the realisation of the map sequence. So the flatten is probably more about 
the datastructures introducing such a ChunkedSeq than about the flatten 
itself.

Kind regards
Meikel

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to