Adds to the back of the queue (last array index)
Last item of toAdd
will potentially be the new end of the queue (depending on capacity limit and overflow policy)
Returns an immutable queue. Queues are useful if you want to treat 'older' or 'newer' items differently. Enqueing adds items at the back of the queue, while dequeing removes items from the front (ie. the oldest).
Creates a new QueueMutable
Returns front of queue (oldest item), or undefined if queue is empty
Creates a PriorityMutable queue.
Simple priority queue implementation. Higher numbers mean higher priority.
Queue (mutable). See also IQueueImmutable for the immutable version.
Queue (immutable). See also QueueMutable.
Queue (mutable). See also IQueueImmutable for the immutable version.
Queue (mutable). See also IQueueImmutable for the immutable version.
A prioritised item in queue
Queues store items in the order in which they are added.