Next: Records, Previous: Priority Queues, Up: Data Structures [Contents][Index]
A queue is a list where elements can be added to both the front and rear, and removed from the front (i.e., they are what are often called dequeues). A queue may also be used like a stack.
Returns a new, empty queue.
Returns #t
if obj is a queue.
Returns #t
if the queue q is empty.
Adds datum to the front of queue q.
Adds datum to the rear of queue q.
Both of these procedures remove and return the datum at the front of
the queue. queue-pop!
is used to suggest that the queue is
being used like a stack.
All of the following functions raise an error if the queue q is empty.
Removes and returns (the list) of all contents of queue q.
Returns the datum at the front of the queue q.
Returns the datum at the rear of the queue q.