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
  [Thrown class java.lang.IllegalArgumentException]

I'm a bit confused about the order in which things are happening here. My
assumption was that (special-fn-spec) would be evaluated before the fn
definition. Is there a way to do something like this?

Thanks
Stuart

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to