On Friday, June 10, 2016 at 3:03:38 PM UTC-7, Francis Avila wrote: > > A higher-order function can do what this macro does: > https://gist.github.com/favila/ecdd031e22426b93a78f >
Oh nice! It looks like I came up with an almost identical solution: (defn transducing [f] (fn [reducing-fn] (fn ([] (reducing-fn)) ([result] (reducing-fn result)) ([result input] (f result input reducing-fn))))) It feels like "writing a custom transducer" should be a common use case, is there anything like these functions we've written that exists in the core library? I didn't see anything like them there or in the reducers library when I first started on my project. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.