type Deque

bend-collections@1.0.0.0 · src/containers/deque.bend:4

import bend-collections@1.0.0.0/src/containers/deque.bend as Deque
import Base

4# Two-list deque: logical order is front ++ reverse(back).
5# Rebalance only when the requested side is empty, moving half the other
6# side. End operations are amortized O(1) along a consumed state history;
7# a rebalance is O(n). to_list is O(n). No arrays, handles or DLL storage.
8type Deque<-T: Data> is Type:
9  DE{front: List<&2, T>, back: List<&2, T>, nf: Nat, nb: Nat}

Uses (2)

Used by (28)