I would say "thread" is used here colloquially - i.e. "works the expr through the forms" and "form" is as defined in clojure.org/reader.
On Sun, Feb 1, 2009 at 4:01 PM, e <evier...@gmail.com> wrote: > is there a definition of "thread" somewhere, and a definition of "form" > somewhere? > > Thanks. > > On Sat, Jan 31, 2009 at 10:31 PM, Jason Wolfe <jawo...@berkeley.edu> wrote: >> >> On Jan 31, 7:09 pm, wubbie <sunj...@gmail.com> wrote: >> > Hi, >> > >> > I saw in ants.clj a notation (->). >> > what is it? >> > For example, >> > (defn place [[x y]] >> > (-> world (nth x) (nth y))) >> >> Did you check the docs? >> >> On the website: >> http://clojure.org/API#toc21 >> >> Within clojure itself: >> >> user> (doc ->) >> ------------------------- >> clojure.core/-> >> ([x form] [x form & more]) >> Macro >> Threads the expr through the forms. Inserts x as the >> second item in the first form, making a list of it if it is not a >> list already. If there are more forms, inserts the first form as the >> second item in second form, etc. >> >> Also: >> user> (macroexpand '(-> world (nth x) (nth y))) >> (nth (clojure.core/-> world (nth x)) y) >> >> > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---