This works because fold is implemented in terms of foldr to trigger build/foldr fusion. However, not all lists will fuse this way. I find, for example, that lists of Doubles refuse to fuse in this way:

So while reliable list fusion is still an unsolved problem, you can still use foldl to get reasonable performance and guarantee no space leaks. Also, there is always the option of using foldl to do the work of assembling derived strict and streaming folds and then implementing list fusion yourself if you want to squeak out every last drop of performance.

I wrote up this library to dispel the myth that only experts can fold things efficiently in Haskell. foldl lets you begin from simple primitive folds that you can fit in your head and then chain them together into complex folds with little effort.

You can use `Fold`s to fold `pipes` just by unpackaging the type and passing the fields to that `foldl` command. I was considering making `foldl` do the unpacking automatically but I've currently chosen not to in order to avoid the dependency.

You can imagine that any library (like `conduit` or `machines`) can reuse `Fold` in the exact same way. It's very reusable.

The reason that this `Fold` type is more general is that it preserves the minimal information necessary to encode the fold without coupling it to any framework. Also, it wouldn't work anyway if you specialized it to `pipes`. You'd lose the information necessary to combine folds if you did that.