A macro should work fine if you use ~@ instead of just ~. (defmacro save-article [path form-params timestamp] `(ds/save! (Article. ~path ~@(vals form-params) ~timestamp)))
On Mar 24, 1:28 pm, Thorsten Wilms <t...@freenet.de> wrote: > On 03/24/2011 05:40 PM, Meikel Brandmeyer wrote: > > > The problem is the constructor call. With plain old clojure > > functions you could use apply, but Java method and constructor > > calls must be hard-wired in the bytecode (and hence at > > compilation time) (if I understood this correctly). > > Guess that's why a macro, which I tried out of sheer curiosity, doesn't > work, either. -- 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