import { type AsyncStream } from "https://deno.land/x/rimbu@0.10.0/mod.ts";
const { NonEmpty } = AsyncStream;
A non-empty and possibly infinite asynchronous sequence of elements of type T. See the Stream documentation and the AsyncStream API documentation
Methods
Returns a non-empty AsyncStream where each element in this stream is paired with its index
Returns a non-empty AsyncStream where mapFun
is applied to each element.
Returns a non-empty AsyncStream where the given mapFun
is applied to each value in the stream, with optionally
as extra arguments the given args
.
Returns a non-empty AsyncStream that returns the elements from this stream given amount
of times.
Returns a non-empty AsyncStream containing the elements of this stream followed by all elements produced by the others
array of AsyncStreamSources.
Returns the mimimum element of the AsyncStream according to a default compare function.
Returns the maximum element of the AsyncStream according to a default compare function.
Returns a non-empty AsyncStream with all elements from the given sep
AsyncStreamSource between two elements of this stream.
Returns a non-empty AsyncStream starting with options.sep
, then returning the elements of this Stream interspersed with options.sep
, and ending with
options.end
.
Returns a non-empty Array containing all elements in the AsyncStream.
Methods
Returns a non-empty AsyncStream where each element in this stream is paired with its index
Returns a non-empty AsyncStream where mapFun
is applied to each element.
Returns a non-empty AsyncStream where the given mapFun
is applied to each value in the stream, with optionally
as extra arguments the given args
.
Returns a non-empty AsyncStream that returns the elements from this stream given amount
of times.
Returns a non-empty AsyncStream containing the elements of this stream followed by all elements produced by the others
array of AsyncStreamSources.
Returns the mimimum element of the AsyncStream according to a default compare function.
Returns the maximum element of the AsyncStream according to a default compare function.
Returns a non-empty AsyncStream with all elements from the given sep
AsyncStreamSource between two elements of this stream.
Returns a non-empty AsyncStream starting with options.sep
, then returning the elements of this Stream interspersed with options.sep
, and ending with
options.end
.
Returns a non-empty Array containing all elements in the AsyncStream.