Link

Table of contents


Dequeue (interface)

Signature

export interface Dequeue<A> {
  take(): Option<readonly [A, Dequeue<A>]>
  offer(a: A): Dequeue<A>
  pull(): Option<readonly [A, Dequeue<A>]>
  push(a: A): Dequeue<A>
  filter(f: Predicate<A>): Dequeue<A>
  find(p: Predicate<A>): Option<A>
  size(): number
  isEmpty(): boolean
}

empty (function)

Signature

export function empty<A>(): Dequeue<A> { ... }

from (function)

Signature

export function from<A>(front: List<A>, back: List<A>): Dequeue<A> { ... }

of (function)

Signature

export function of<A>(a: A): Dequeue<A> { ... }