top | item 9805961

(no title)

birdsbolt | 10 years ago

It improves the performance by fusing some of the operations doing them in one pass instead of multiple passes, and it does so generically - operations are composed regardless of the source, and the implementation isn't looking at the type of the source at all.

I believe one of the arguments was also that these couldn't be written in statically typed languages. Although, I do not know if this turned out to be true.

discuss

order

coolsunglasses|10 years ago

>I believe one of the arguments was also that these couldn't be written in statically typed languages. Although, I do not know if this turned out to be true.

It's not true, they were just abstrusely defined and there's some weirdness around the implicit effects that you can choose to either ignore or incorporate into the equivalent.

Fusion is one of the main things Haskell is known for and an API that gets close enough to what one would use transducers for is `Control.Lens.Fold`.

Others have made more faithful attempts at making it explicit, such as in this post: http://jspha.com/posts/typing-transducers/