(defmacro thrush-with-sym [[sym] first & exprs] (if (seq exprs) `(let [~sym ~first] (thrush-with-sym [~sym] ~@exprs)) first))
a small variation with the ability to chose any symbol for intermediate values.. Just thought of sharing it ... Thanks, Sunil. On Fri, May 27, 2011 at 1:15 PM, Meikel Brandmeyer <[email protected]> wrote: > Hi, > > the ~ in front of first is too much, because first is not in a > syntax-quote. Also I wouldn't capture var because it is special form. > > (defmacro bound-> > [fst & more] > (if (seq more) > `(let [~'v ~fst] > (bound-> ~@more)) > fst)) > > > Sincerely > Meikel > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with > your first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
