> On Apr 1, 2015, at 11:16 AM, Alex Miller <a...@puredanger.com> wrote: > > - eduction now takes multiple transformations, not just one, and composes > them. This is designed for mechanical rewriting (hello tool developers!!) of > ->> chains like this: > > (->> s (interpose 5) (partition-all 2)) > > to this: > > (->> s (eduction (interpose 5) (partition-all 2))) >
Maybe it’s just me, but the eduction argument order just looks strange to me. For a variadic function, I would have expected the single collection to come first, then any number of xforms. There must be a better reason than mechanical rewriting. Wouldn't a macro make more sense? (defmacro educe->> [coll & xfs] `(->Eduction (comp ~@xfs) ~coll)) So the rewrite could be just educe->> for ->>, without having to wrap the xforms at all. (educe->> s (interpose 5) (partition-all 2)) Steve Miner stevemi...@gmail.com -- 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.