UNPKG

@thi.ng/dcons

Version:

Double-linked lists with comprehensive set of operations (incl. optional self-organizing behaviors)

13 lines 402 B
import type { Maybe } from "@thi.ng/api"; export interface ConsCell<T> { value: T; next: Maybe<ConsCell<T>>; prev: Maybe<ConsCell<T>>; } export interface IList<T> { append(value: T): ConsCell<T>; prepend(value: T): ConsCell<T>; insertAfter(cell: ConsCell<T>, value: T): ConsCell<T>; insertBefore(cell: ConsCell<T>, value: T): ConsCell<T>; } //# sourceMappingURL=api.d.ts.map