On Programming Clojure I read:

> The method-as-function idiom is a common one, so Clojure provides
> the memfn macro to wrap methods for you:

(map (memfn toUpperCase) ["a" "short" "message"])
-> ("A" "SHORT" "MESSAGE")

But one could already write:

(map #(.toUpperCase %) ["a" "short" "message"])
-> ("A" "SHORT" "MESSAGE")

Are they cases where we cannot use the second form and the first is
required?

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