for package:pipes

(for p body) loops over p replacing each yield with body.
for :: Functor m => Producer b m r -> (b -> Effect       m ()) -> Effect       m r
for :: Functor m => Producer b m r -> (b -> Producer   c m ()) -> Producer   c m r
for :: Functor m => Pipe   x b m r -> (b -> Consumer x   m ()) -> Consumer x   m r
for :: Functor m => Pipe   x b m r -> (b -> Pipe     x c m ()) -> Pipe     x c m r
The following diagrams show the flow of information:
.--->   b
/        |
+-----------+            /   +-----|-----+                 +---------------+
|           |           /    |     v     |                 |               |
|           |          /     |           |                 |               |
x ==>    p    ==> b   ---'   x ==>   body  ==> c     =     x ==> for p body  ==> c
|           |                |           |                 |               |
|     |     |                |     |     |                 |       |       |
+-----|-----+                +-----|-----+                 +-------|-------+
v                            v                               v
r                            ()                              r
For a more complete diagram including bidirectional flow, see "Pipes.Core#respond-diagram".