• Iterators may be used instead of iteratees in Scala, but they are
imperative, so are not a
purely functional solution. • In Haskell, two alternative abstractions known as Conduits and Pipes have been developed. (These Pipes are not operating system level pipes, so like iteratees they do not require the use of
system calls). Conduits in particular are associated with substantially richer libraries of primitives and combinators than iteratees; conduit adapters for incremental functionalities such as parsing HTML, XML, generalised parsing, making HTTP requests and processing the responses, exist, making conduits more suitable than iteratees for industrial software development in Haskell, out of the box. • There is also a high-level abstraction named machines. In Scala there is a package called FS2: Functional Streams for Scala, whose ancestry can be traced back to machines via several ports, renames and refactors. • In Haskell, the package safe-lazy-io exists. It provides a simpler solution to some of the same problems, which essentially involves being "strict enough" to pull all data that is required, or might be required, through a pipeline which takes care of cleaning up the resources on completion. ==References==