On Fri, Mar 25, 2011 at 9:03 AM, Thorsten Wilms <t...@freenet.de> wrote: > On 03/25/2011 11:37 AM, Ken Wesson wrote: > >>> By now I'm rather sure this would trigger an error, as nothing but an >>> immediate call of Article. seems acceptable for ds/save!. >> >> Why do you say that? Either your ds-save! is a function that accepts >> Article objects, and that apply expression returns one; or else your >> ds-save! is a macro that accepts an s-expression that will become part >> of its expansion and which works if it evaluates to an Article object >> at run-time, which the apply expression does. > > I say that because of what Meikel said at > http://groups.google.com/group/clojure/msg/2f2b97b627da2d1d?hl=en > and because my experiments suggest so.
He said you can't use (apply Article. constructor-arg seq-of-constructor-args) and he's right -- you can't (apply Class. ...) or (apply .method object ...). But you *can* (defn function [x] (Class. x)) and you *can* then (apply function seq-of-constructor-args). That *should* work. -- 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