On 17 Jun, 2011, at 9:20 , Ken Wesson wrote:

>> Shouldn't it be possible to apply Math/sqrt directly? If I use a
>> function from the clojure.core, I can do it:
>> user=> (map str (range 1 10))
>> ("1" "2" "3" "4" "5" "6" "7" "8" "9")
> 
> Java methods aren't first-class functions, so they can't be mapped, or
> used directly in filter or partition-by or similarly. But as you've
> found you can wrap one in a closure to use it.

Java methods aren't even first-class objects (nor, in fact, objects at all) in 
the Java world. Clojure can hardly do better than Java in unifying things at 
the JVM level. The one thing that you can do with a method in Java is call it, 
and the same limitation applies in Clojure.

Konrad.

-- 
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
Note that posts from new members are moderated - please be patient with your 
first post.
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