>>>>> Michael Thompson <practical.wis...@gmail.com> writes:

> John, that isn't inspecting the keys for equality, but isn't the main
> problem that, if when upstream closes, the pipe will still have the last
> pair received stored in `loop`?

Right, the algorithm should only emit (k, v) when there is a change from k ->
k', so you always lose the sum of the last key when either side terminates. I
think the groupsBy based version is the correct one.

John

-- 
You received this message because you are subscribed to the Google Groups 
"Haskell Pipes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to haskell-pipes+unsubscr...@googlegroups.com.
To post to this group, send email to haskell-pipes@googlegroups.com.

Reply via email to