News for hackers. Stuff that matters.
Re:“Transducers” by Rich Hickey at Strange Loop [video] by dwenzek on Monday September 22, 2014 @01:29PM (#8351510)
To code typed transducers we only need "for all" generics.

   type Transducer a b = forall r . (r -> b -> r) -> (r -> a -> r)
This may seems unusual or complex but is available in mainstream languages. In java:

   interface Transducer<A,B> {
      <R> Reducer<B,R> transduce(Reducer<A,R> reducer);
   }
See https://gist.github.com/didier-wenzek/07faa3990ff03fdea372 for a more complete java implementation of transducers.

There are no comments on this comment yet.