Skip to content

KHeapFactory = <A>(k, order, items?) => KHeap<A>

Defined in: packages/heap/src/k-heap.ts:133

Create a KHeap of arity k from an order and an optional iterable of items.

Separate from BinaryHeapFactory because the arity is a construction parameter rather than part of the kind: KHeapKind records the direction, not k.

A

number

Order<A>

Iterable<A>

KHeap<A>

With code INVALID_ARITY when k is not an integer of at least 2.