circular buffer (from last time)
model
- always contains at least one element
- values inserted to right of bar
- values removed from right of bar
basic operations
- make-circular-buffer : T –> CB
- insert! : CB x T –> undefined
- remove! : CB –> T
- rotate-left! : CB –> undefined
- rotate-right! : CB –> undefined
- size : CB –> int
implementation hints
- use only a singly-linked list
- all ops are 0(1) time except for rotate-right! and size