On Feb 5, 9:44 pm, nchubrich wrote:
> Is there ever any reason to use memfn as opposed to ordinary
> functions, i.e.
>
> (def div (fn [x y] (.divide x y)))
You should normally use the doted notation. I used it while
experimenting with a macro that wrap Java classes, but it isn't the
right way to
I only bound it to a var to be clear; the intent was that it would be
called directly for the first arg to apply, thus (memfn divide x) may
end up being fewer chars and more informational than #(.divide %1
%2). But yeah, not a huge thing. It very well may precede
the .prefix notation.
On Feb 5,
Is there ever any reason to use memfn as opposed to ordinary
functions, i.e.
(def div (fn [x y] (.divide x y)))
On Feb 5, 4:20 pm, ataggart wrote:
> On Feb 5, 12:34 pm, Nicolas Buduroi wrote:
>
> > Hi, I'm searching for a way of applying a sequence of arguments to a
> > Java method, but haven't
On Feb 5, 4:20 pm, ataggart wrote:
> You could also use memfn.
Exactly what I wanted!
> Though it requires reflection. To deal with that you could make your
> own type-hinted function:
That's a good point. I've finally gave up using apply (well, the
version based on Rich code above) on methods
On Feb 5, 12:34 pm, Nicolas Buduroi wrote:
> Hi, I'm searching for a way of applying a sequence of arguments to a
> Java method, but haven't found anything yet. Tried to write a macro
> for it and don't even see how that would be possible. Is there a way
> to do that?
>
> Thanks
>
> - budu
You
Hi,
Am 05.02.2010 um 21:34 schrieb Nicolas Buduroi:
> Hi, I'm searching for a way of applying a sequence of arguments to a
> Java method, but haven't found anything yet. Tried to write a macro
> for it and don't even see how that would be possible. Is there a way
> to do that?
http://paste.lisp
Hi, I'm searching for a way of applying a sequence of arguments to a
Java method, but haven't found anything yet. Tried to write a macro
for it and don't even see how that would be possible. Is there a way
to do that?
Thanks
- budu
--
You received this message because you are subscribed to the