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
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
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
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