Prev Next

Concurrent Haskell

 main :: IO ()
 main = do { c <- getChar; putChar c; putChar c }
 forkIO :: IO a -> IO ThreadId
 main = do { forkIO (print ’x’); print ’y’ }
24