(defmacro ->f "like -> but f is threaded at pos 0 instead of 1" ([f] f) ([f x] `(~f ~x)) ([f x & more] `(->f (~f ~x) ~@more)))
(->f m 2 2 1) Scott On Wed, Jun 29, 2011 at 7:00 PM, Antonio Recio <amdx6...@gmail.com> wrote: > Is there other way to express (((m2) 2) 1)? > (def m [1 2 [21 22 [221 222 223] 23] 3]) > (((m 2) 2) 1) > ;-> 222 > > -- > 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