Re: A proposal for an alternative implementation of clojure.core/transduce

2014-10-17 Thread Michael van Acken
Am Freitag, 17. Oktober 2014 15:52:49 UTC+2 schrieb Daniel James: > > [...] > > Great, Michael, I think we're both on the same page. > > After all that, I was ultimately arguing that it is technically incorrect > to say: > > “… trying to splice a group-by-style *transducer* into an existing > (c

Re: A proposal for an alternative implementation of clojure.core/transduce

2014-10-17 Thread Michael van Acken
Am Freitag, 17. Oktober 2014 15:01:51 UTC+2 schrieb Daniel James: > > [...] > Your function is good for use with `reduce`, but only that. I hope I’ve > helped build an intuition for why it’s actually impossible to implement > ‘group by’ as a transducer. > This is correct. Unlike you, I am ex

Re: A proposal for an alternative implementation of clojure.core/transduce

2014-10-17 Thread Michael van Acken
Correction after actually trying it out: In this case you might prefer to write something like (transduce xform > (comp group-by-xf +) ...) instead > of (transduce (comp xform group-by-xf) + ...) . [...] > The first variant must use a valid rf, and needs to be written as (transduce xform ((group

Re: A proposal for an alternative implementation of clojure.core/transduce

2014-10-16 Thread Michael van Acken
Am Freitag, 17. Oktober 2014 04:02:52 UTC+2 schrieb Daniel James: > > Hi Michael, > > I’m glad you are in favor of this change; however, and with tongue firmly > in cheek, you’ve taken a beautiful thing and corrupted it, which I can’t > condone. ;) > > Let me offer an explanation as to why I half

Re: A proposal for an alternative implementation of clojure.core/transduce

2014-10-16 Thread Michael van Acken
Am Mittwoch, 15. Oktober 2014 18:34:39 UTC+2 schrieb Daniel James: > > [...] > In my proposal above, nothing is changing about the fact that transducers > transform reducing functions to new reducing functions. The simple change > is to use the reducing function that is produced by a transformati