<p><pre><code> trans :: (b -> a) -> (c -> a -> c) -> c -> b -> c
</code></pre>
in Haskell is just<p><pre><code> trans f reduce c = reduce c . f
</code></pre>
isn't it? What am I missing here?
Seems like parametricity ensures that<p><pre><code> Transducer a b
</code></pre>
is isomorphic to<p><pre><code> b -> [a]
</code></pre>
Am I missing something?
> ...a level of abstraction that I think has not been expressed much in the world of dynamically typed languages, although the techniques are two decades old in the Haskell community in a statically typed setting<p>Calling Clojure "dynamically typed" in this context (or any context), is confusing, as it is more of a mashup of a few ideas from functional and OO languages than a typical dynamically typed language. For example, Clojure does not have dynamic dispatch (except for multimethods, which are a limited form of dynamic dispatch) other than that offered by OO polymorphism (interfaces/protocols). In other words, it lacks the most important mechanism that lends dynamically typed languages like JavaScript and Ruby their power.<p>It is a language that, like Java/C#/Go, is based on interfaces, which are then mixed with some functional concepts. Unlike the aforementioned OO languages, Clojure usually uses only a handful of such abstractions (or interfaces; or protocols). So, while the translation to Haskell requires such concepts as type classes and higher-rank types, this has nothing to do with dynamic typing, and a lot to do with plain old OO polymorphism.