What's in this library?
The Fold1 consumes a single Producer, while the Fold2 datatype consumes two Producers concurrently.
Why was this library created?
I wanted a fold-like datatype for Producers that allowed "bracketing" operations like "withFile".
I also wanted to be able to fold two Producers concurrently (for example, merge the piped stdout & stderr streams of an external process into one unified stream).
Finally, I wanted the fold-like datatype to have a "failure option" baked in.
If you don't need any of that, you are better off using pipes and/or foldl by themselves.
Where can I find working examples for this library?
There are none yet.
- depend on microlens
- compatibility with foldl 1.2.
- removed lens-family dependency.
- solved bom problem.
- Made it compile in GHC 7.8.4.
- Added "eachLine" function.
- Solved bug in "combined", added a test.
- Dropped unneeded deps.
- More efficient Applicative for Fold2
- Added folds of two Producers.
- Name changes.