]>
A queue is an aggregate structure which allows insertion at the back of the queue, deletion at the front of the queue and inspection of the front element. Queues are similar to a line of people where you can join the line at the back, leave the line at the front, or see the person in the front of the line.
Queues can be created from a list of elements using the queue Queue function.
An empty queue can be created using the empty function.
The empty? function will return true if the queue contains no elements.
Queues modify their arguments so they use the exclamation mark "!" as part of the function name.
The dequeue! operation removes the front element of the queue and returns it. The queue is one element smaller. The extract! does the same thing with a different name.
The enqueue! function adds a new element to the back of the queue and returns the element that was pushed. The queue is one element larger. The insert! function does the same thing with a different name.
To read the top element without changing the queue use the front function.