previous | index | next

Exercise 13.13

More Suggestions

The queue is represented as a two-element vector, with the first element referring to the queue's start, and the second element to its tail.

The actual elements (nodes) of the queue are represented as mutable pairs (mconses), so they will be accessed with:

When changing what follows a node in the queue, use set-mcdr!.

Suggestions for the ADT operations on next slide.


previous | index | next