I'm trying to figure out how to process a large number of files (ByteStrings) in groups of, say 20, with the results of each group going to a different output file.
For instance, I have: theFiles :: Producer ByteString m r processFile :: Handle -> ByteString -> IO () and for the first 20 ByteStrings I want the handle passed to processFile to be opened to "output-1", and for the next 20 it should be opened to "output-2", etc. I'm sure I could write it in a very mundane fashion using Pipes.foldM, but I'm sure there is a better way. Thanks! -- 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.