Skip to content

Instantly share code, notes, and snippets.

@snoyberg
Created September 24, 2013 10:40
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 snoyberg/6683033 to your computer and use it in GitHub Desktop.
Save snoyberg/6683033 to your computer and use it in GitHub Desktop.
import Data.Conduit
import Data.Conduit.List (drop, isolate, fold)
import Prelude hiding (drop)
main :: IO ()
main = do
res <- mapM_ yield [1..20] $$ do
drop 5
res1 <- isolate 5 =$ fold (+) 0
drop 5
res2 <- isolate 5 =$ fold (+) 0
return (res1, res2)
print res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment