module Futures import Data.List import Data.So import System import System.Future import System.Info constant : IO () constant = do let a = await $ fork "String" putStrLn a map : IO () map = do future1 <- forkIO $ do usleep 10000 putStrLn "#2" let future3 = map (const "#3") future1 future2 <- forkIO $ do putStrLn "#1" pure $ await future2 putStrLn (await future3)