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

Reply via email to