tailRecM
io.iteratee.files.SuspendableFileModule#readBytesFromStream
are not supposed to be consumed multiple times, right? I.e. if I create an Enumerator
instance and consume it in a certain way (e.g. taking head
of it), it doesn’t make sense to keep that instance, because I’ll not be able to consume it again.
Seq[Char]
s all over the place.
Task
type
Eval
for effect capture? suspicious eyes
Capture
and Async
type classes. You create an instance of a module and get file I/O enumerators, etc., and part of creating the module instance is that you have to handle effect capture.
Enumerator.liftMEval
. I was skeptical about providing first-class support in core for effect capture for types like Future
, but Oscar talked me into a couple of concessions, and liftMEval
is one of them.
Enumerator
Enumerator.liftMEval(Eval.always { Future { println("hi"); 5 }}).take(5).toVector
doesnt seemt o do what i think it does