Common Lisp Package: PETTOMATO-DEQUE

README:

FUNCTION

Public

DEQUE->LIST (DEQUE)

Returns the elements of the queue as a list. The original queue is not modified.

Private

Undocumented

DEQUE-FULL-P (DEQUE)

GROW-DEQUE (DEQUE)

MOVE-HEAD-BACK (DEQUE)

MOVE-HEAD-FORWARD (DEQUE)

MOVE-TAIL-BACK (DEQUE)

MOVE-TAIL-FORWARD (DEQUE)

MACRO

Public

DO-ALL-ELEMENTS ((ELEMENT DEQUE) &BODY BODY)

Iterate through deque in the order that pop-front would return elements, and bind each element to element in body. element is bound using a symbol-macrolet so that the value referenced by element can be changed using setf.

Private

Undocumented

DECF-MOD (PLACE DIVISOR)

INCF-MOD (PLACE DIVISOR)

GENERIC-FUNCTION

Public

ELEMENT-COUNT (QUEUE)

Returns the number of elements currently in the queue.

EMPTY-P (QUEUE)

Returns a generalized boolean: true if the queue is empty, otherwise false.

EXPIRE-FRONT-TO (DEQUE INDEX)

Move front up to index. It is permissible for index to be greater than max-index; the queue will be cleared and min-index and max-index will be set to index. Returns deque.

GROW-BACK-TO (DEQUE INDEX VALUE)

Ensure that deque is large enough to be indexed at index. If not, value will be pushed on until it is. If value is a function, the function will be called and the returned value will be used. Returns deque.

NTH-ELEMENT (QUEUE INDEX)

Accesses the element of the queue specified by index.

PEEK-BACK (QUEUE)

Returns the element at the back of the queue without removing it from the queue.

PEEK-FRONT (QUEUE)

Returns the element at the front of the queue without removing it from the queue.

POP-BACK (QUEUE)

Removes the element at the back of the queue and returns it.

POP-FRONT (QUEUE)

Removes the element at the front of the queue and returns it.

PUSH-BACK (QUEUE VALUE)

Push value on to the back of queue. Returns queue.

PUSH-FRONT (QUEUE VALUE)

Push value on to the front of queue. Returns queue.

Undocumented

SETFNTH-ELEMENT (VAL QUEUE INDEX)

SLOT-ACCESSOR

Private

Undocumented

BUFFER (OBJECT)

SETFBUFFER (NEW-VALUE OBJECT)

HEAD-INDEX (OBJECT)

SETFHEAD-INDEX (NEW-VALUE OBJECT)

MAX-INDEX (OBJECT)

SETFMAX-INDEX (NEW-VALUE OBJECT)

MIN-INDEX (OBJECT)

SETFMIN-INDEX (NEW-VALUE OBJECT)

TAIL-INDEX (OBJECT)

SETFTAIL-INDEX (NEW-VALUE OBJECT)

CLASS

Public

DEQUE

A double ended queue.

IDEQUE

A double ended queue that allows indexing.