Hi,

On Feb 22, 12:18 am, Johnny Kwan <[email protected]> wrote:
> I'm really new to Clojure, but I'm under the impression that reduce would
> be better than apply, since I assume that apply would reify the entire
> sequence at once, whereas reduce would consume the sequence one by one.
> Could someone more familiar with the implementation weigh in on this?

apply is lazy.

user=> (defn test-apply [& xs] (prn (take 10 xs)))
#'user/test-apply
user=> (apply test-apply (iterate inc 0))
(0 1 2 3 4 5 6 7 8 9)
nil

Sincerely
Meikel

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to