A hash table consists of: a class type, a parent type, and a set of key-value pairs. The keys and values can be anything. The access functions below accept a key and return the corresponding value. For details of the mechanism underlying this, see
hashing.
One important feature of hash tables that when the keys are consecutive integers starting at 0, the keys are scanned in the natural order.
There is a subclass of HashTable called
MutableHashTable which consists of those hash tables whose entries can be changed.
Access functions:
- # -- length, or access to elements
- . -- access to elements whose key is a symbol
Query functions:
- #? -- check for presence of elements
- .? -- check for presence of elements whose key is a symbol