"May be delayed"

But I don't think they ever are:

user=> (def oddseq (map #(do (print %) %) (range 30)))
#'user/oddseq

user=> (defn foo [& args] 'd)
#'user/foo

user=> (apply foo oddseq)
01234567891011121314151617181920212223242526272829d

user=> (def oddseq (map #(do (print %) %) (range 1)))
#'user/oddseq

user=> (apply foo oddseq)
0d

user=>

I don't think it's possible to ever have apply not evaluate all its
arguments? I think this is what Nathan was saying. Given the above
example, is there anyway to not have the side effects automatically
run when invoking apply?

Timothy



-- 
“One of the main causes of the fall of the Roman Empire was
that–lacking zero–they had no way to indicate successful termination
of their C programs.”
(Robert Firth)

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