Data.Enumerator question

I can see that an Enumeratee can produce fewer outputs than it receives as inputs. For example, this GroupBy Enumeratee.
Can an Enumeratee produce more outputs than inputs? For instance, take a Data.Text and send each character to the inner Iteratee individually. I feels this can be done, but don't see how to do it. Thanks. ____________________ David Place Owner, Panpipes Ho! LLC http://panpipesho.com d@vidplace.com

David Place
I can see that an Enumeratee can produce fewer outputs than it receives as inputs. For example, this GroupBy Enumeratee.
Can an Enumeratee produce more outputs than inputs? For instance, take a Data.Text and send each character to the inner Iteratee individually. I feels this can be done, but don't see how to do it.
Yes. Just look at the definition of Enumeratee. It is an iteratee function, which takes an iteratee (by its Step value) and produces another iteratee, possibly with additional input. It can pass the iteratee any input it wants, possibly dependent on the outer input stream. In other words, the enumeratee is an iteratee, which consumes an input stream and derives from it the input stream of another iteratee. It is well possible to simply ignore the outer input stream (in which case you have about the same functionality as a regular enumerator). Greets, Ertugrul -- nightmare = unsafePerformIO (getWrongWife >>= sex) http://ertes.de/
participants (2)
-
David Place
-
Ertugrul Soeylemez