scalaz/scalaz-stream — pull request #119 by stucchio (2014-03-02 15:14:06+00:00)
Title: Create `scanF` method

Currently there is a `Process.scan` method which computes (oversimplifying here) a cumulative sum of a process. The function it takes to do this with has type `(B,O) => B`.

For some stuff I was doing, I needed an alternative version, which does the same thing but with an effectful function of type `(B,O) => F[B]`. This pull request provides that function, currently called `scanF`.

The implementation can almost certainly be made less ugly, and I'm not sure I'm handling errors correctly.