On Mar 27, 11:51 pm, Nathan Sorenson <n...@sfu.ca> wrote: > When trawling the ClojureScript source, I was a little puzzled when I first > noticed that cljs.core/apply respects the laziness of the seq its provided. > Fogus mentioned this feature in his Clojure/west talk and it reminded me of > my earlier puzzlement. > > This choice seems to contradict Clojure's eager argument evaluation > semantics. Is the motivation of this choice described anywhere? I'm > guessing I am missing an obvious use case.
You've misunderstood how clojure.core/apply behaves - it passes sequences lazily as well. For example, (apply (fn f [& args] (take 3 args)) (range)) works fine, even though you pass an infinite number of arguments to f. -- 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