import { type ListFactory } from "https://deno.land/x/rimbu@0.14.1/list/custom/index.ts";
Methods
of<T>(...values: ArrayNonEmpty<T>): List.NonEmpty<T>
Returns an immutable set of this type and context, containing the given values
.
from<T>(...sources: ArrayNonEmpty<StreamSource.NonEmpty<T>>): List.NonEmpty<T>
Returns an immutable set of this collection type and context, containing the given values in source
.
from<T>(...sources: ArrayNonEmpty<StreamSource<T>>): List<T>
fromString<S extends string>(...sources: ArrayNonEmpty<StringNonEmpty<S>>): List.NonEmpty<string>
Returns a List of characters from the given strings in sources
.
fromString(...sources: ArrayNonEmpty<string>): List<string>
flatten<T extends StreamSource.NonEmpty<unknown>>(source: StreamSource.NonEmpty<T>): T extends StreamSource.NonEmpty<infer S> ? List.NonEmpty<S> : never
Returns, if T is a valid StreamSource
, the result of concatenating all
streamable elements of the given sources.
flatten<T extends StreamSource<unknown>>(source: StreamSource<T>): T extends StreamSource<infer S> ? List<S> : never
unzip<T extends readonly unknown[] & { length: L; }, L extends number>(source: StreamSource.NonEmpty<T>, length: L): [K in keyof T]: List.NonEmpty<T[K]>
Returns an array of Lists, where each list contains the values of the corresponding index of tuple T.
unzip<T extends readonly unknown[] & { length: L; }, L extends number>(source: StreamSource<T>, length: L): [K in keyof T]: List<T[K]>
reducer<T>(source?: StreamSource<T>): Reducer<T, List<T>>
Returns a Reducer
that appends received items to a List and returns the List as a result. When a source
is given,
the reducer will first create a List from the source, and then append elements to it.