[Haskell-cafe] Iteratee package: combining enumerators
mxcantor at gmail.com
Mon Jul 26 00:19:06 EDT 2010
I have a series of files with binary encoded data in them, and want to create an enumerator iterates on the first element at the front of all the files. Something like the pseudocode: return . minimum =<< mapM (fmap (heads . lines) readFile) listOfFileNames
I can use convStream to create an enumerator which runs iteratees on each tuple in a single file:
(convStream decodeStrings) :: Monad m => IterateeG  String m a -> IterateeG WrappedByteString Word8 m (IterateeG  MyDataType m a)
or, with the EnumerateeGMM tysyn:
(convStream decodeStrings) :: Monad m => EnumerateeGMM WrappedByteString Word8  String m a
My question is if there is a simple way to combine the Enumeratees to enumerate on a set of files or if I have to write an enumerator from scratch.
Thank you in advance,
P.S. John, apologies for the duped email, sent from the wrong address by mistake.
More information about the Haskell-Cafe