Just a simple queue data type.
An empty queue, ready for pushin'.
Put the given element at the back of the given queue. O(1).
Get the first element of the queue and the queue with the first element removed. Returns nothing if the queue is empty. Amortized O(1).
A list consisting of the elements in the order in which they were put into the queue (i.e., "front to back").
A queue is a sequence supporting O(1) appending (
push) of a new element to the back and amortizsed O(1) removal of the element at the front (pop).