(->var 10 (* 2 var)) should be returning 20 ... On Fri, May 27, 2011 at 1:08 PM, Sunil S Nandihalli < sunil.nandiha...@gmail.com> wrote:
> Hi Miekel > > Yea I have done that but it seems clunky .. :( > > however here is my first attempt at it .. which is not working .. may be > you can help me here.. > > (defmacro ->var [first & exprs] > (if (seq exprs) `(let [~'var ~first] > (->var ~@exprs)) > ~first)) > > I don't understand why .. > Thanks, > Sunil. > > On Fri, May 27, 2011 at 1:03 PM, Meikel Brandmeyer <m...@kotka.de> wrote: > >> Hi, >> >> a quick'n'works-now way is: >> >> (-> x >> abc >> ((fn [x] (do-stuff-with x (refering-twice x)))) >> (xyz fgh)) >> >> Or: (#(do-stuff-with % (refering-twice %))) >> >> Sincerely >> Meikel >> >> -- >> 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 > > > -- 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