Hi Meikel, thanks for the answer.

I wonder if someone could explain or point me to the explanation about
*why* a Java static fn can't be passed just like a closure fn?

After all the syntax to call them is the same :)

Thanks,
Boris


On Apr 27, 5:34 pm, Meikel Brandmeyer <m...@kotka.de> wrote:
> Hi,
>
> Am 27.04.2009 um 23:17 schrieb Boris Mizhen:
>
> > ((comp #(Math/abs %) +) -3 -4) => 7
>
> > How can I pass a static java function to another function?
>
> Here you already gave the answer to your question. Wrap it in
> a Clojure fn/#().
>
> > A member function must be trickier because this must be supplied, but
> > perhaps a macro can be created that results in a function that would
> > capture this and call the member function appropriately ...
>
> #(.someMethod an-object %)
>
> Or passing in the object:
>
> #(.someMethod %1 %2)
>
> For apply and friends one needs a more elaborate way.
> Search for "rhickey jcall site:paste.lisp.org".
>
> Sincerely
> Meikel
>
>  smime.p7s
> 5KViewDownload
--~--~---------~--~----~------------~-------~--~----~
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