1module Streamly.Examples.SearchEngineQuery where
4import Network.HTTP.Simple
6-- Runs three search engine queries in parallel.
7searchEngineQuery :: IO ()
9 putStrLn "Using parallel alternative"
10 runSerialT $ google <|> bing <|> duckduckgo
12 putStrLn "\nUsing parallel applicative zip"
13 runZipAsync $ (,,) <$> pure google <*> pure bing <*> pure duckduckgo
16 get s = liftIO (httpNoBody (parseRequest_ s) >> putStrLn (show s))
17 google = get "https://www.google.com/search?q=haskell"
18 bing = get "https://www.bing.com/search?q=haskell"
19 duckduckgo = get "https://www.duckduckgo.com/?q=haskell"
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list