import { type Stream } from "https://deno.land/x/rimbu@1.0.0/stream/main/index.ts";
const { NonEmpty } = Stream;
A non-empty and possibly infinite sequence of elements of type T. See the Stream documentation and the Stream API documentation
Methods
Returns a non-empty Stream where each element in this Stream is paired with its index
Returns a non-empty Stream where mapFun
is applied to each element.
Returns a non-empty tream where the given mapFun
is applied to each value in the stream, with optionally
as extra arguments the given args
.
Returns a Stream consisting of the concatenation of flatMapFun
applied to each element.
Returns a Stream consisting of the concatenation of flatMapFun
applied to each element, zipped with the element that was provided to the function.
Returns a Stream consisting of the concatenation of StreamSource elements resulting from applying the given reducer
to each element.
Returns the first element of the Stream.
Returns the last element of the Stream.
Returns a non-empty Stream that returns the elements from this Stream given amount
of times.
Returns a Stream containing the elements of this Stream followed by all elements produced by the others
array of StreamSources.
Returns the mimimum element of the Stream according to a default compare function.
Returns the mimimum element of the Stream according to the provided compare
function.
Returns the maximum element of the Stream according to a default compare function.
Returns the maximum element of the Stream according to the provided compare
function.
Returns a non-empty Stream with all elements from the given sep
StreamSource between two elements of this Stream.
Returns a non-empty Stream starting with options.sep
, then returning the elements of this Stream interspersed with options.sep
, and ending with
options.end
.
Returns a non-empty Stream containing non-repetitive elements of the source stream, where repetitive elements
are compared using the optionally given eq
equality function.
Returns a Stream containing the values resulting from applying the given the given next
function to a current state (initially the given init
value),
and the next Stream value, and returning the new state.
Returns a non-empty Array containing all elements in the Stream.