Oh, I should have said, when I suggested we might propose a `split` 
to Gabriel for Pipes.Group, that it should be a lens, thus with the type

    split :: (Monad m)  => (a -> Bool) -> Lens' (Producer a m r) (FreeT 
(Producer a m) m r)

or maybe 

    split :: (Monad m, Eq a) => a -> Lens' (Producer a m r) (FreeT 
(Producer a m) m r)

It occurs to me `Pipes.Group.groupBy` permits things like this

     >>> let cmp a b = a /=  mempty && b /= mempty 

     >>> let kludge p = PG.folds (\a b -> a <> "\n" <> b)  mempty id 
(accumLines p ^. PG.groupsBy cmp)

     >>>  runEffect $ kludge txt >-> P.filter (/= "\n") >-> P.print

     "\nhello\nworld"

     "\ngoodbye"



-- 
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