Copyright (C) 2000-2012 |
GNU Info (slib.info)QueuesQueues ------ `(require 'queue)' 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. - Function: make-queue Returns a new, empty queue. - Function: queue? obj Returns `#t' if OBJ is a queue. - Function: queue-empty? q Returns `#t' if the queue Q is empty. - Procedure: queue-push! q datum Adds DATUM to the front of queue Q. - Procedure: enquque! q datum Adds DATUM to the rear of queue Q. All of the following functions raise an error if the queue Q is empty. - Function: queue-front q Returns the datum at the front of the queue Q. - Function: queue-rear q Returns the datum at the rear of the queue Q. - Prcoedure: queue-pop! q - Procedure: dequeue! 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. automatically generated by info2www version 1.2.2.9 |