Drops the first n
elements of this Stream
, and returns the new Stream
.
Like dropWhile, but drops the first value which tests false.
Drops elements of the this stream until the predicate p
fails, and returns the new stream.
Drops elements of the this stream until the predicate p
fails, and returns the new stream.
If defined, the first element of the returned stream will fail p
.
Writes all inputs to the output of the returned Pull
.
Reads a single element from the input and emits it to the output.
Reads a single element from the input and emits it to the output. Returns the new Handle
.
Reads the next available segment from the input and emits it to the output.
Reads the next available segment from the input and emits it to the output. Returns the new Handle
.
Like unconsN
, but leaves the buffered input unconsumed.
Awaits the next available element where the predicate returns true.
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.
Writes a single true
value if all input matches the predicate, false
otherwise.
Returns the last element of the input, if non-empty.
Like uncons but does not consume the segment (i.e., the segment is pushed back).
Like uncons1 but does not consume the element (i.e., the element is pushed back).
Like scan
but f
is applied to each segment of the source stream.
Like scan
but f
is applied to each segment of the source stream.
The resulting segment is emitted and the result of the segment is used in the
next invocation of f
. The final state value is returned as the result of the pull.
More general version of scanSegments
where the current state (i.e., S
) can be inspected
to determine if another segment should be pulled or if the pull should terminate.
More general version of scanSegments
where the current state (i.e., S
) can be inspected
to determine if another segment should be pulled or if the pull should terminate.
Termination is signaled by returning None
from f
. Otherwise, a function which consumes
the next segment is returned wrapped in Some
. The final state value is returned as the
result of the pull.
Emits the first n
elements of the input.
Emits the last n
elements of the input.
Like takeWhile, but emits the first value which tests false.
Emits the elements of the stream until the predicate p
fails,
and returns the remaining Stream
.
Emits the elements of the stream until the predicate p
fails,
and returns the remaining Stream
. If non-empty, the returned stream will have
a first element i
for which p(i)
is false
.
Waits for a segment of elements to be available in the source stream.
Waits for a segment of elements to be available in the source stream.
The segment of elements along with a new stream are provided as the resource of the returned pull.
The new stream can be used for subsequent operations, like awaiting again.
A None
is returned as the resource of the pull upon reaching the end of the stream.
Like uncons but waits for a single element instead of an entire segment.
Like uncons but waits for a chunk instead of an entire segment.
Like uncons, but returns a segment of no more than n
elements.
Like uncons, but returns a segment of no more than n
elements.
The returned segment has a result tuple consisting of the remaining limit
(n
minus the segment size, or 0, whichever is larger) and the remainder
of the source stream.
Pull.pure(None)
is returned if the end of the source stream is reached.
Like uncons, but returns a segment of exactly n
elements, splitting segments as necessary.
Like uncons, but returns a segment of exactly n
elements, splitting segments as necessary.
Pull.pure(None)
is returned if the end of the source stream is reached.
Projection of a
Stream
providing various ways to get aPull
from theStream
.