Created
September 15, 2014 19:57
-
-
Save jb55/161a01223e6e92dc41a5 to your computer and use it in GitHub Desktop.
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
type Error = Text | |
type Url = Text | |
downloadPage :: Url -> IO (Either Error Text) | |
downloadPage url = -- ... | |
operations :: [Url] -> IO () | |
operations urls = do | |
pages :: [Either Error Text] | |
pages <- concurrentMap downloadPage urls | |
let failures = filter isLeft pages | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment