Re: higher order functions and metadata

2013-05-02 Thread Phillip Lord
"John D. Hume" writes: > On Thu, May 2, 2013 at 8:33 AM, Phillip Lord > wrote: > >> Well, I guess I will code up a simple macro; in my current case, I can >> infer the arglists anyway. >> > > Once you do, be sure to weigh the complexity against: > > (defn my-partial-function [y] (my-function 10 y

Re: higher order functions and metadata

2013-05-02 Thread John D. Hume
On Thu, May 2, 2013 at 8:33 AM, Phillip Lord wrote: > Well, I guess I will code up a simple macro; in my current case, I can > infer the arglists anyway. > Once you do, be sure to weigh the complexity against: (defn my-partial-function [y] (my-function 10 y)) -- -- You received this message b

Re: higher order functions and metadata

2013-05-02 Thread Phillip Lord
Tassilo Horn writes: >>> But since you have to add the docstring by hand anyway, I don't think >>> that's much of an issue: >>> >>> (def ^{:doc "Applies my-function to 10 and y." >>> :arglists '([y])} >>>my-partial-function (partial my-function 10)) >> >> Sure this is what I hav

Re: higher order functions and metadata

2013-05-02 Thread Tassilo Horn
phillip.l...@newcastle.ac.uk (Phillip Lord) writes: >> Well, that's nothing special wrt. higher-order functions, but a >> limitation when you define functions with `def`. E.g., >> >> (def my-function (fn [x y])) > > Yes, of course. But I have defn to use an option in this case. Sure. `defn`

Re: higher order functions and metadata

2013-05-02 Thread Phillip Lord
Tassilo Horn writes: >> I've been refactoring some code recently, part of which has include >> the introduction of higher-order function. But this is causing me some >> grief in terms of extra work. Let me give an example: >> >> user> (defn my-function [x y]) >> #'user/my-function >> user> (doc my

Re: higher order functions and metadata

2013-05-02 Thread Tassilo Horn
phillip.l...@newcastle.ac.uk (Phillip Lord) writes: > I've been refactoring some code recently, part of which has include > the introduction of higher-order function. But this is causing me some > grief in terms of extra work. Let me give an example: > > user> (defn my-function [x y]) > #'user/my-

higher order functions and metadata

2013-05-02 Thread Phillip Lord
I've been refactoring some code recently, part of which has include the introduction of higher-order function. But this is causing me some grief in terms of extra work. Let me give an example: user> (defn my-function [x y]) #'user/my-function user> (doc my-function) - use