Created
July 6, 2013 17:55
-
-
Save LeifWarner/5940676 to your computer and use it in GitHub Desktop.
Run two IO actions concurrently. Seems to run the second one first, for me.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS_GHC -F -pgmF she #-} | |
import Control.Applicative | |
import Control.Concurrent.Async | |
action = (| Concurrently getLine ++ Concurrently getLine |) | |
main = putStrLn =<< runConcurrently action |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment