4 ms·
My own attempt at implementing something like transducers in Haskell: http://hackage.haskell.org/package/foldl-transduce http://hackage.haskell.org/package/fold
by danidiaz 11y ago
My own attempt at implementing something like transducers in Haskell: http://hackage.haskell.org/package/foldl-transduce http://hackage.haskell.org/package/foldl-transduce.
It depends on the useful "foldl" library of reducers.
- boothead 11y agoThis looks really useful! Isn't your Transduction the same as doing premap (or lmap from Profunctor)?
- danidiaz 11y agoTransformations created with premap are stateless, they depend only on the current input. So one can't build UTF8 decoders with them, for example. That said, if you supply a function to premap, the result typechecks as a "Transduction".