Hi,

On 16 Okt., 08:17, Timothy Pratley <[EMAIL PROTECTED]> wrote:
> What does 'mix in non-methods' means? I read the (doc ->) but I really
> don't follow that explination.

-> is more general than .. . .. only works on objects.

  (.. foo (bar baz) (frob nicate))

is equivalent to

  (. (. foo bar baz) frob nicate)

However -> works on everything, but with the same idea.

  user=> (-> true (if inc dec) (map [1 2 3]))
  (2 3 4)

or expanded

  (map (if true inc dec) [1 2 3])

So one can also use macros and normal functions in ->,
ie. non-methods.

Sincerely
Meikel


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to