How is it possible to create Enumerator for BufferedReader?
I found rather old article: http://apocalisp.wordpress.com/2010/10/17/scalaz-tutorial-enumeration-based-io-with-iteratees/ and it looks like it doesn't work with Scalaz 6.0.4
I try to create Enumerator based on example from here: Idiomatic construction to check whether a collection is ordered
implicit val ListEnumerator = new Enumerator[List] {
def apply[E, A](e: List[E], i: IterV[E, A]): IterV[E, A] = e match {
case List() => i
case x :: xs => i.fold(done = (_, _) => i,
cont = k => apply(xs, k(El(x))))
}
}
But I can't understand how to combine IO monad with Enumerator