From: Eric Rasmussen <ericrasmussen@gmail.com>
Hi,
Examples are very helpful to me too -- thank you for sharing. I'm especially
curious to see if there are any examples that allow you to use or convert
non-iteratee-based functions. I have only just begun reading about iteratees
and might be missing the point, but it seems like many of the examples so
far rely on explicit recursion or special functions from one of the iteratee
modules.
Is there a way to take a simple function (example below) and use an
enumerator to feed it a ByteString from a file, or do you have to write
functions explicitly to work with a given iteratee implementation?
import qualified Data.ByteString.Char8 as B
sortLines = B.unlines . sort . B.lines