Reference

Queue

New
Input A list of elements.
Output A queue containing the list of elements with the first element at the beginning of the queue.
Enqueue
Input A queue and an element.
Output A new queue with the element added to the end.
Dequeue
Input A queue.
Output A new queue with the element at the beginning removed.
Peek
Input A queue.
Output The element at the beginning of the queue.
Is Empty
Input A queue.
Output True if the queue is empty, false otherwise.
Is Not Empty
Input A queue.
Output True if the queue is not empty, false otherwise.
Length
Input A queue.
Output The number of elements in the queue.
Reverse
Input A queue.
Output A new queue with the elements in reverse order.