It is not in the Clojure API because it is declared private in the source file 
core.clj where it is defined.  If you want to study Clojure's core code, it is 
essential in cases like this that you get a full source tree and search through 
it for such things:

git clone git://github.com/clojure/clojure.git

Or any other method you like to get it from here:

http://github.com/clojure/clojure

You can also see it from the REPL with:

(source clojure.core/spread)

Andy

On Oct 9, 2012, at 10:03 AM, Larry Travis wrote:

> As participants in this googlegroup have often observed, an excellent way to 
> learn Clojure is to study the source definitions of its API functions.   This 
> advice works better for learners who know Java, which I don't. I sometimes 
> think that, if I were to teach a "Clojure Programming" course, I would list a 
> "Java Programming" course as a prerequisite (for both teacher and students!). 
> But here is some Clojure.core source code that raises a problem for me which 
> surely doesn't have anything to do with not knowing Java.
> 
> user> (source list*)
> (defn list*
>   "Creates a new list containing the items prepended to the rest, the
>   last of which will be treated as a sequence."
>   {:added "1.0"
>    :static true}
>   ([args] (seq args))
>   ([a args] (cons a args))
>   ([a b args] (cons a (cons b args)))
>   ([a b c args] (cons a (cons b (cons c args))))
>   ([a b c d & more]
>      (cons a (cons b (cons c (cons d (spread more)))))))
> 
> --------------
> What is the function spread?  It is not in the Clojure API -- and the 
> definition of list* seems to me to be complete without it.
>   --Larry

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