
15 Jun
2016
15 Jun
'16
2:08 a.m.
Foldl from conduit combinators?
On Tue, Jun 14, 2016 at 22:54
Hello, I'm trying to use Data.Conduit, but I get stuck with mapAccum as how to get and retrieve the result. If I use it, I get a simple conduit like :
testC :: ConduitM () Int IO Int testC = Src =$= cdt where src = CL.sourceList [1..10] cdt = CL.mapAccum (\x s -> (x+s, x) 0
I can get the output with testC $$ CL.consume but how do I retrieve the accumulated sum ?
Bruno
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe