On 19 Sep 2010, at 07:21, Stuart Campbell wrote:
In this method, the first two parameters may be null. So, my fn
looks like this:
(defn exported-keys
([table]
(exported-keys nil table))
([schema table]
(exported-keys nil schema table))
([catalog schema table]
(fetch-metad
>
> Macroexpansion is part of the expression evaluation mechanism. In your
> example
>
>
>(defn foo
> ([bar] (foo bar :default))
> (special-fn-spec))
>
> the whole defn-form is macroexpanded first, yielding something like
>
>(def foo (fn ([bar] (foo bar :default))
On 18 Sep 2010, at 07:15, Stuart Campbell wrote:
In the following contrived example, I get an error when
macroexpanding (defn foo ...):
(defmacro special-fn-spec []
'([bar baz] (println bar baz)))
(defn foo
([bar] (foo bar :default))
(special-fn-spec))
The error is:
Parameter declarat
in a (def f [] E), only a E is going to be macro-expanded. (I think
the rule of thumb is that macro are only expanded in a position
where an expression is.)
You can build :
(defmacro macro-expanding-defn [name l]
) using a combination of macro-expand, defn and macro?
(You can also do a simpler
Hello,
In the following contrived example, I get an error when macroexpanding (defn
foo ...):
(defmacro special-fn-spec []
'([bar baz] (println bar baz)))
(defn foo
([bar] (foo bar :default))
(special-fn-spec))
The error is:
Parameter declaration special-fn-spec should be a vector
[Thro