> while writing this email i had a light switch on that i could simply > do it like this: > (let [obj (MutatingJavaObject.)] > (loop [in list-items] > (when (not (empty? in)) > (.add obj (first in)) > (recur (rest in)))) > obj) > but i would still like to know if there is a way i could get the macro > i wanted going.
Macro will not work in this situation, but you can write it as: (let [obj (MutatingJavaObject.)] (doseq [item list-items] (.add obj item))) -- Krešimir Šojat -- 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