<div dir="ltr">I'm afraid I doon't follow what it meant by the stream here. Could you provide a complete, runnable example and indicate what the expected and actual output are?<div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 17, 2017 at 5:48 AM, jun zhang <span dir="ltr"><<a href="mailto:zhangjun.julian@gmail.com" target="_blank">zhangjun.julian@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear cafes<br>
<br>
I use Conduit to parse a huge file. And I need merge lines by condition.<br>
<br>
I find the concatMapAccumC can do that and I write a demo as blow(with conduit-combinators-1.0.6,lts-<wbr>6.18).<br>
The problem is if the last item didn’t make condition true, the data only keep in the accum but missing in stream.<br>
<br>
Any one can give me some advises?<br>
<br>
Thanks<br>
<br>
<br>
----------------------------<br>
import Conduit<br>
<br>
test'::Int->Int->(Int,[Int])<br>
test' a s = case (a+s) > 5 of<br>
    True -> (0,[a+s])<br>
    False -> (a+s,[])<br>
<br>
testlog::IO [Int]<br>
testlog = runConduit $ (yieldMany [1,2,3,4,5,6,3]) $=  (concatMapAccumC test' 0 ) $$ sinkList<br>
<br>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bi<wbr>n/mailman/listinfo/haskell-caf<wbr>e</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div><br></div></div>