Acquire a resource within a Pull
.
Acquire a resource within a Pull
. The cleanup action will be run at the end
of the .close
scope which executes the returned Pull
. The acquired
resource is returned as the result value of the pull.
Like acquire but the result value is a tuple consisting of a cancellation pull and the acquired resource.
Like acquire but the result value is a tuple consisting of a cancellation pull and the acquired resource. Running the cancellation pull frees the resource. This allows the acquired resource to be released earlier than at the end of the containing pull scope.
Await the next available Chunk
from the Handle
.
Await the next available Chunk
from the Handle
. The Chunk
may be empty.
Await a single element from the Handle
.
Await a single element from the Handle
.
Await the next available element from the input, or None
if the input is exhausted.
Await the next available element from the input, or None
if the input is exhausted.
Like await
, but return a Chunk
of no more than maxChunkSize
elements.
Like await
, but return a Chunk
of no more than maxChunkSize
elements.
Return a List[Chunk[I]]
from the input whose combined size has a maximum value n
.
Return a List[Chunk[I]]
from the input whose combined size has a maximum value n
.
Await the next available nonempty Chunk
.
Await the next available nonempty Chunk
.
Await the next available non-empty chunk from the input, or None
if the input is exhausted.
Await the next available non-empty chunk from the input, or None
if the input is exhausted.
Await the next available chunk from the input, or None
if the input is exhausted.
Await the next available chunk from the input, or None
if the input is exhausted.
Interpret this Pull
to produce a Stream
.
Copy the next available chunk to the output.
Copy the next available chunk to the output.
Copy the next available element to the output.
Copy the next available element to the output.
The completed Pull
.
Drop the first n
elements of the input Handle
, and return the new Handle
.
Drop the first n
elements of the input Handle
, and return the new Handle
.
Drop the elements of the input Handle
until the predicate p
fails, and return the new Handle
.
Drop the elements of the input Handle
until the predicate p
fails, and return the new Handle
.
If nonempty, the first element of the returned Handle
will fail p
.
Write all inputs to the output of the returned Pull
.
Write all inputs to the output of the returned Pull
.
Read a single element from the input and emit it to the output.
Read a single element from the input and emit it to the output. Returns the new Handle
.
Read the next available chunk from the input and emit it to the output.
Read the next available chunk from the input and emit it to the output. Returns the new Handle
.
Promote an effect to a Pull
.
The Pull
that reads and outputs nothing, and fails with the given error.
Like awaitN
, but leaves the buffered input unconsumed.
Like awaitN
, but leaves the buffered input unconsumed.
Await the next available element where the predicate returns true
Await the next available element where the predicate returns true
Monadic bind.
Folds all inputs using an initial value z
and supplied binary operator, and writes the final
result to the output of the supplied Pull
when the stream has no more values.
Folds all inputs using an initial value z
and supplied binary operator, and writes the final
result to the output of the supplied Pull
when the stream has no more values.
Folds all inputs using the supplied binary operator, and writes the final result to the output of
the supplied Pull
when the stream has no more values.
Folds all inputs using the supplied binary operator, and writes the final result to the output of
the supplied Pull
when the stream has no more values.
Write a single true
value if all input matches the predicate, false otherwise
Write a single true
value if all input matches the predicate, false otherwise
Return the last element of the input Handle
, if nonempty.
Return the last element of the input Handle
, if nonempty.
Repeatedly use the output of the Pull
as input for the next step of the pull.
Repeatedly use the output of the Pull
as input for the next step of the pull.
Halts when a step terminates with Pull.done
or Pull.fail
.
If p
terminates with fail(e)
, invoke handle(e)
.
Consult p2
if p
fails due to an await
on an exhausted Handle
.
Write a Chunk[W]
to the output of this Pull
.
Write a Chunk[W]
to the output of this Pull
.
Write a single W
to the output of this Pull
.
Write a single W
to the output of this Pull
.
Write a stream to the output of this Pull
.
Like await
, but runs the await
asynchronously.
Like await
, but runs the await
asynchronously. A flatMap
into
inner Pull
logically blocks until this await completes.
The Pull
that reads and outputs nothing, and succeeds with the given value, R
.
Apply f
to the next available Chunk
.
Apply f
to the next available Chunk
.
Apply f
to the next available element.
Apply f
to the next available element.
Apply f
to the next available element, or None
if the input is exhausted.
Apply f
to the next available element, or None
if the input is exhausted.
Apply f
to the next available chunk, or None
if the input is exhausted.
Apply f
to the next available chunk, or None
if the input is exhausted.
Emit the first n
elements of the input Handle
and return the new Handle
.
Emit the first n
elements of the input Handle
and return the new Handle
.
Emits the last n
elements of the input.
Emits the last n
elements of the input.
Like takeWhile
, but emits the first value which tests false.
Like takeWhile
, but emits the first value which tests false.
Emit the elements of the input Handle
until the predicate p
fails,
and return the new Handle
.
Emit the elements of the input Handle
until the predicate p
fails,
and return the new Handle
. If nonempty, the returned Handle
will have
a first element i
for which p(i)
is false
.