public
Created

  • Download Gist
gistfile1.hs
Haskell
1 2 3 4 5 6 7 8 9 10 11 12 13
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.