Skip to main content
Module

x/rimbu/stream/custom/stream-custom.ts>ArrayStream

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class ArrayStream
extends StreamBase<T>
import { ArrayStream } from "https://deno.land/x/rimbu@0.13.1/stream/custom/stream-custom.ts";

Constructors

new
ArrayStream(
array: readonly T[],
startIndex?,
endIndex?,
reversed?,
)

Properties

readonly
length: number

Methods

contains(
searchValue: T,
amount?,
eq?: Eq<T>,
): boolean
count(): number
drop(amount: number): Stream<T>
elementAt<O>(index: number, otherwise?: OptLazy<O>): T | O
every(pred: (value: T, index: number) => boolean): boolean
find<O>(
pred: (value: T, index: number) => boolean,
occurrance?,
otherwise?: OptLazy<O>,
): T | O
first<O>(otherwise?: OptLazy<O>): T | O
forEach(f: (
value: T,
index: number,
halt: () => void,
) => void
, state?
): void
indexOf(
searchValue: T,
occurrance?,
eq?: Eq<T>,
): number | undefined
last<O>(otherwise?: OptLazy<O>): T | O
some(pred: (value: T, index: number) => boolean): boolean
take(amount: number): Stream<T>
toArray(): T[]