It might be useful to have foldChunksM (implementation included at the
bottom) along with foldM to complement
the pair of mapChunksM_ with mapM_
foldChunksM :: (Monad m, Nullable s) => (a -> s -> m a) -> a -> Iteratee s m a
foldChunksM f = liftI . go
where
go a (Chunk c) = lift (f a c) >>= liftI . go
go a e = idone a e