>>>>> Jacob Stanley <ja...@stanley.io> writes: > Is there any way I can get this to have the type `Pipe (k, v) (k, v) m r`?
Is this what you are looking for: foldValues :: (Monad m, Eq k) => (v -> v -> v) -> Pipe (k, v) (k, v) m r foldValues append = loop Nothing where loop mx = do (k, v) <- await yield (k, maybe v (`append` v) mx) loop (Just v) 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.