Re: Macro problem: passing a function to a macro

2013-10-22 Thread Phillip Lord
Tassilo Horn writes: > Phillip Lord writes: > >> Is it because you're expansion returns the symbol and not the >> function. >> >> ('inc 2) >> >> returns nil which is what I think is happening. > > Ah, indeed. I really whished that would throw an error. I mean, it's > cool that keywords can l

Re: Macro problem: passing a function to a macro

2013-10-22 Thread Tassilo Horn
Phillip Lord writes: > Is it because you're expansion returns the symbol and not the > function. > > ('inc 2) > > returns nil which is what I think is happening. Ah, indeed. I really whished that would throw an error. I mean, it's cool that keywords can lookup themselves in maps, but I don't

RE: Macro problem: passing a function to a macro

2013-10-22 Thread Phillip Lord
tober 2013 10:37 To: clojure@googlegroups.com Subject: Macro problem: passing a function to a macro Hi all, I'd like to have a macro that I can call and pass it some function that the macro uses inside. Concretely, the macro iterates over some class model and should expand to a ns declaratio

Macro problem: passing a function to a macro

2013-10-22 Thread Tassilo Horn
Hi all, I'd like to have a macro that I can call and pass it some function that the macro uses inside. Concretely, the macro iterates over some class model and should expand to a ns declaration with one defn per class in the model. Currently, the macro calls a generate-defn-for-class function in