On Tue, 2011-12-13 at 16:28 -0800, Alan Malloy wrote:
> As you can see, only as many elements are realized as are needed to
> satisfy the user's request.

Yes, in the expression (conr (conr (conr '( 1 2 3) 4) 6) 7), all the
lazy-seqs implied by the conr calls must be forced immediately to yield
(1 . more).  It is the same problem with repeatedly concatting to the
end, and with left-fold in a top-down evaluation scheme like Haskell:
you can run out of stack if you must travel deep to get to the first
element.

-- 
Stephen Compall
^aCollection allSatisfy: [:each|aCondition]: less is better


-- 
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

Reply via email to