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

x/rimbu/list/custom/builder/gen-builder.ts>GenBuilder

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
class GenBuilder
implements [List.Builder]<T>
import { GenBuilder } from "https://deno.land/x/rimbu@1.0.2/list/custom/builder/gen-builder.ts";

Constructors

new
GenBuilder(context: ListContext, builder?: LeafBuilder<T>)

Properties

_lock: number
append: (value: T) => void
appendAll: (values: StreamSource<T>) => void
build: () => List<T>
buildMap: <T2>(f: (value: T) => T2) => List<T2>
forEach: (f: (
value: T,
index: number,
halt: () => void,
) => void
, state?: TraverseState
) => void
get: <O>(index: number, otherwise?: OptLazy<O>) => T | O
insert: (index: number, value: T) => void
readonly
isEmpty: boolean
readonly
length: number
prepend: (value: T) => void
remove: <O>(index: number, otherwise?: OptLazy<O>) => T | O
set: <O>(
index: number,
value: T,
otherwise?: OptLazy<O>,
) => T | O
updateAt: <O>(
index: number,
update: Update<T>,
otherwise?: OptLazy<O>,
) => T | O

Methods

appendArray(array: T[]): void
appendFullOrLastWindow(window: T[]): void
checkLock(): void