Provides an alternative
Applicative instance for
ConduitT. In this instance, every incoming value is provided
to all
ConduitTs, and output is coalesced together. Leftovers
from individual
ConduitTs will be used within that component,
and then discarded at the end of their computation. Output and
finalizers will both be handled in a left-biased manner.
As an example, take the following program:
main :: IO ()
main = do
let src = mapM_ yield [1..3 :: Int]
conduit1 = CL.map (+1)
conduit2 = CL.concatMap (replicate 2)
conduit = getZipConduit $ ZipConduit conduit1 <* ZipConduit conduit2
sink = CL.mapM_ print
src $$ conduit =$ sink
It will produce the output: 2, 1, 1, 3, 2, 2, 4, 3, 3
Since 1.0.17