Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/rimbu/stream/async-custom/index.ts>AsyncFoldIterator

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

Constructors

new
AsyncFoldIterator(
source: AsyncFastIterator<I>,
init: AsyncOptLazy<R>,
getNext: (
current: R,
value: I,
index: number,
halt: () => void,
) => MaybePromise<R>
,
)

Properties

optional
current: R
isInitialized: boolean
state

Methods

fastNext<O>(otherwise?: AsyncOptLazy<O>): Promise<R | O>