Created
August 17, 2012 13:52
-
-
Save sdiehl/3378849 to your computer and use it in GitHub Desktop.
applicative_url for dabeaz
This file contains hidden or 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
| import Network.HTTP | |
| import Data.Functor ((<$>)) | |
| import Control.Applicative ((<*>)) | |
| fetch1 = simpleHTTP (getRequest "http://www.dabeaz.com/") >>= getResponseBody | |
| fetch2 = simpleHTTP (getRequest "http://www.dabeaz.com/blog.html") >>= getResponseBody | |
| combined = (++) <$> fetch1 <*> fetch2 | |
| main :: IO () | |
| main = combined >>= print |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment