> In the olden lisp days, reduce was often preferred to
> apply because apply could hit limits on the number of
> arguments that could be passed to a function. Is that a
> potential issue with clojure?

No. Clojure's `apply` is lazy. Varargs are passed to the
function as a lazy sequence, and it's up to the function to
realize them or not.

For example, this is perfectly valid:

    (defn foo [x y z & args]
      ;; args is never used
      z)

    (apply foo (range))  ; call with infinite sequence
    ;;=> 2

-S

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to