Also, on a related note, lazy-cat always evaluates its first argument:

user> (do (lazy-cat (do (prn "1") (list 1)) nil) nil)
"1"
nil
user> (do (lazy-cons (do (prn "1") (list 1)) nil) nil)
nil

which is confusing given its documentation:

user> (doc lazy-cat)
-------------------------
clojure.core/lazy-cat
([coll] [coll & colls])
Macro
  Expands to code which yields a lazy sequence of the concatenation
  of the supplied colls.  Each coll expr is not evaluated until it is
  needed.

If this is the desired behavior, the docs should probably be updated
to explain that the first coll is always "needed" right away.  If so,
I'm also curious why this is the case.

Thanks,
Jason
--~--~---------~--~----~------------~-------~--~----~
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
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