These are generic hash tables, and are in the structure
Strictly speaking they are more maps than tables, as every table has a
value for every possible key (for that type of table).
All but a finite number of those values are
(make-table) -> table
(make-symbol-table) -> symbol-table
(make-string-table) -> string-table
(make-integer-table) -> integer-table
(make-table-maker compare-proc hash-proc) -> procedure
Make-tablereturns a table whose keys may be symbols, integer, characters, booleans, or the empty list (these are also the values that may be used in
caseexpressions). As with
case, comparison is done using
eqv?. The comparison procedures used in symbol, string, and integer tables are
Make-table-maker takes two procedures as arguments and returns
a nullary table-making procedure.
Compare-proc should be a two-argument equality predicate.
Hash-proc should be a one argument procedure that takes a key
and returns a non-negative integer hash value.
( returns true,
must also return true.
make-integer-table could be defined
(make-table-maker = abs).
Make-table-immutable! prohibits future modification to its argument.
(table? value) -> boolean
(table-ref table key) -> value or #f
(table-set! table key value)
(table-walk procedure table)
Table?is the predicate for tables.
table-set!access and modify the value of
procedure, which must accept two arguments, to every associated key and non-
Default-hash-functionis the hash function used in the tables returned by
string-hashit the one used by
Previous: Finite record types | Next: Port extensions