On Friday, October 17, 2014 10:24:32 AM UTC-4, Michael van Acken wrote: > > Ah, understood. I am using the term as in http://clojure.org/transducers, > where it is defined as > > A *transducer* (sometimes referred to as xform or xf) is a transformation > from one reducing function to another: > > ;; transducer signature > (whatever, input -> whatever) -> (whatever, input -> whatever) > > In my point of view, this is a general formulation that covers the > composition of reducing functions both in a > process and a reduce scenario. > > As I said before, this is a necessary, but not a sufficient condition. It does not tell the full story. That definition provides a useful introduction for building an intuition, but it is refined later in that document as well as in Rich Hickey’s talk at Strange Loop.
The promise of transducers is that you can give me one and I am free to use everywhere in a *open* world of transducible processes, `transduce`, `into`, `sequence`, `chan`, being initial examples. There is no way to write a transformation on reducing functions that provides the ‘group by’ semantics you are looking for, without breaking that contract. Irrespective of whether you accept my claims about typing transducers[1], the very fact that your `group-by-xf` function does not operate correctly in this open world is the sufficient counter-example to show that it is not a ‘transducer’ in the precise sense. Dan [1] http://conscientiousprogrammer.com/blog/2014/08/07/understanding-cloure-transducers-through-types/#comment-1533318972 “The rank-2 type in particular captures an important property.” Rich Hickey -- 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.