<div style="white-space:pre-wrap">Foldl from conduit combinators?</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jun 14, 2016 at 22:54 <<a href="mailto:bruno@ruomad.net">bruno@ruomad.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<div name="messageBodySection">Hello,<br>
I'm trying to use Data.Conduit, but I get stuck with mapAccum as how to get and retrieve the result.<br>
If I use it, I get a simple conduit like :<br>
<br>
testC :: ConduitM () Int IO Int<br>
testC = Src =$= cdt where<br>
src = CL.sourceList [1..10]<br>
cdt = CL.mapAccum (\x s -> (x+s, x) 0<br>
<br>
I can get the output with<br>
testC $$ CL.consume<br>
but how do I retrieve the accumulated sum ?<br>
<br>
Bruno</div>
<div name="messageSignatureSection"><br></div>
</div>

_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org" target="_blank">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div>