Comment on Understanding Clojure Transducers Through TypesComments−gipp12y trans :: (b -> a) -> (c -> a -> c) -> c -> b -> c in Haskell is just trans f reduce c = reduce c . f isn't it? What am I missing here?−tel12yHe ends up calling that `mapping` later mapping :: (a -> b) -> Transducer b a mapping f xf r a = xf r (f a) which, modulo a little renaming, eta-expansion, and point elimination is the same as your `trans`−platz12yyour trans is just the "mapping" case. in general other functions can be applied to (c -> a -> c) -> c -> b -> c which will have more complex implementations than just composition.
Comments
He ends up calling that `mapping` later
which, modulo a little renaming, eta-expansion, and point elimination is the same as your `trans`your trans is just the "mapping" case. in general other functions can be applied to (c -> a -> c) -> c -> b -> c which will have more complex implementations than just composition.