Chapter 10. Tables

RScheme provides an implementation of hash tables, both generic and specialized for certain kinds of keys. The hash table facilities are provided by the tables module.

top[0]=>,(use tables)
top[1]=>(define t (make-table))
value := t
value := #[<generic-table> @080f_605b]

The <table> class is the abstract class of collections which map an explicit set of keys to values. The only concrete subclasses of <table> are subclasses of the class <hash-table>.

Hash tables are created using the make-table function.

Table operations

Table of Contents
make-table -- Constructs a new hash table
table-lookup -- Searches a table for the given key
table-key-present? -- Checks a table for the presence of a given key
table-insert! -- Associates a key with a value in a table
table-remove! -- Removes a given key from a table
table-size -- Computes the number of keys in the table.
key-sequence -- Returns a sequence of table keys
value-sequence -- Returns a sequence of table values
table-for-each -- Applies a procedure to entries in a hash table