Okey, writing some pipes code I ended up writing a function that takes two
producers and turn them into one.
```
merge :: Producer a m r -> Producer a m r -> Producer (Either a a) m ()
merge pL pR = do
(output, input) <- lift $ spawn Unbounded
lift . forkIO $ do runEffect $ pL >-> P.map Left >-> toOutput output
performGC
lift . forkIO $ do runEffect $ pR >-> P.map Right >-> toOutput output
performGC
fromInput input
```
Now I also need something like Pipes.Prelude.tee but that only consumes
Left values and forward Right values without consuming them, looking at the
source of tee I got quite confused. Has anybody written such function or
could help me implement it?
Regards, klrr
--
You received this message because you are subscribed to the Google Groups
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].