var deque = new Deque([1, 2, 3]);
An ordered collection of values with fast random access, push, pop, shift,
and unshift, but slow to splice.
A double ended queue is backed by a circular buffer, which cuts down on garbage
As long as the queue is stable, meaning values are added and removed at roughtly
the same pace, the backing store will not create new objects.
The store itself is an object with numeric indexes, like an array.
The indexes of the deque are offset from the indexes within the circular buffer,
and values spill over from the end of the buffer back to the beginning.
As values are removed by way of shifting, it makes room for values by way of
Deques have constants maxCapacity and minCapacity.