Exercise #6

A table is a data structure that can hold any number of elements, as a list can, but accesses those arguments through user-specified keys rather than by position. Let's say that the interface to tables consists of five procedures:

Keys may be symbols, numbers, or strings, so you should use Scheme's built-in equal? predicate to compare them.

Once you have implemented this table interface, design, write, and test the following procedures, using your implementation of tables:

This exercise will be due at 9 a.m. on Wednesday, March 10.


This document is available on the World Wide Web as

http://www.cs.grinnell.edu/~stone/courses/scheme/exercises/6.xhtml

Validated as XHTML 1.1 by the World Wide Web Consortium Cascading Style Sheet validated by the World Wide Web Consortium

created March 5, 2004
last revised March 5, 2004

John David Stone (stone@cs.grinnell.edu)