123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- \title{(macduffie queue)}
- \author{Jason K. MacDuffie}
- \subsection{\scheme{(queue . list)}}
- Converts \var{list} into a queue. This procedures makes
- a copy of the list, so future operations on the queue
- will not modify \var{list} and vice-versa.
- \subsection{\scheme{(list->queue list)}}
- Converts \var{list} into a queue. The list is copied,
- so the same guarantees apply.
- \subsection{\scheme{(queue->list queue)}}
- Converts \var{queue} into a list. The queue is copied,
- so the same guarantees apply.
- \subsection{\scheme{(queue-add! queue value)}}
- Adds \var{value} to the back of the queue.
- \subsection{\scheme{(queue-add-front! queue value)}}
- Adds \var{value} to the front of the queue. This was
- included because it is an O(1) operation anyway.
- \subsection{\scheme{(queue-remove! queue)}}
- Removes the item at the front of the queue, returning
- that item. It is an error if \var{queue} is empty.
- \subsection{\scheme{(queue? obj)}}
- Returns #true if \var{obj} is a queue. Otherwise,
- returns #false.
- \subsection{\scheme{(queue-empty? queue)}}
- Returns #true if \var{queue} is empty. Otherwise,
- returns #false.
- \subsection{\scheme{(queue-length queue)}}
- Returns the number of items in \var{queue}.
- \subsection{\scheme{(queue-front queue)}}
- Returns the item in the front of the queue. It
- is an error if \var{queue} is empty.
- \subsection{\scheme{(queue-back queue)}}
- Returns the item in the back of the queue. It
- is an error if \var{queue} is empty.
|