mapAccum package:conduit

Analog of mapAccumL for lists. Note that in contrast to mapAccumL, the function argument takes the accumulator as its second argument, not its first argument, and the accumulated value is strict. Subject to fusion Since 1.1.1
Consume a source with a strict accumulator, in a way piecewise defined by a controlling stream. The latter will be evaluated until it terminates.
>>> let f a s = liftM (:s) $ mapC (*a) =$ CL.take a

>>> reverse $ runIdentity $ yieldMany [0..3] $$ mapAccumS f [] (yieldMany [1..])
[[],[1],[4,6],[12,15,18]] :: [[Int]]
mapWhileC with a break condition dependent on a strict accumulator. Equivalently, mapAccum as long as the result is Right. Instead of producing a leftover, the breaking input determines the resulting accumulator via Left.
Monadic mapAccumWhileC.
mapWhile with a break condition dependent on a strict accumulator. Equivalently, mapAccum as long as the result is Right. Instead of producing a leftover, the breaking input determines the resulting accumulator via Left. Subject to fusion
Monadic mapAccumWhile. Subject to fusion
Monadic mapAccum. Subject to fusion Since 1.1.1
concatMap with an accumulator.
concatMapM with an accumulator.
concatMap with an accumulator. Subject to fusion
concatMapM with an accumulator. Subject to fusion
concatMap with a strict accumulator. Subject to fusion Since 0.3.0
concatMapM with a strict accumulator. Subject to fusion Since 0.3.0