(pfds deque)

deque? : any -> boolean tests if an object is a deque deque-length : deque -> non-negative integer returns the number of items in the deque

(make-deque)

make-deque : () -> deque returns a deque containing to items

(deque-empty? deque)

deque-empty? : deque -> boolean returns true if there are no items in the deque, false otherwise

(enqueue-front deque item)

enqueue-front : deque any -> deque returns a new deque with the inserted item at the front

(enqueue-rear deque item)

enqueue-rear : deque any -> deque returns a new deque with the inserted item at the rear

(dequeue-front deque)

dequeue-front : deque -> any queue returns two values, the item at the front of the deque, and a new deque containing all the other items raises an error if the deque is empty

(dequeue-rear deque)

dequeue-rear : deque -> any queue returns two values, the item at the rear of the deque, and a new deque containing all the other items raises an error if the deque is empty

(list->deque l)

list->deque : listof(any) -> deque returns a deque containing all of the elements in the list. The order of the elements in the deque is the same as the order of the elements in the list.

(deque->list deq)

deque->list : deque -> listof(any) returns a list containing all the elements of the deque. The order of the elements in the list is the same as the order they would be dequeued from the front of the deque.