Skip to content

Instantly share code, notes, and snippets.

@jb55
Created September 15, 2014 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jb55/161a01223e6e92dc41a5 to your computer and use it in GitHub Desktop.
Save jb55/161a01223e6e92dc41a5 to your computer and use it in GitHub Desktop.
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