In hindsite1, what I was trying to say in my last post was this: Folds in the foldl library are Moore machines and what I often need is a Mealy machine. data Fold a b = forall x . Fold (x -> a -> x) x (x -> b) ^ ^ ^ ^ ^ ^ input output state step begin done A user of the Fold type (scan in the pipes library is an example) has access to the computational results via done which is only hooked up to t