import Control.Concurrent.Bag.Safe import Control.Concurrent.STM (TChan) import Fib main :: IO () main = newEvalBag Nothing [fib 42, fib 43] $ do getResult >>= liftIO . putStrLn . show :: BagT TChan Int IO () getResult >>= liftIO . putStrLn . show getResult >>= liftIO . putStrLn . show