Next: , Previous: , Up: Hash Tables   [Contents][Index]


54.2 Working With Hash Tables

Function: puthash key value hash-table

This function hashes key to value in hash-table.

Function: gethash key hash-table &optional default

This function finds the hash value for key in hash-table. If there is no entry for key in hash-table, default is returned (which in turn defaults to nil).

Function: remhash key hash-table

This function removes the entry for key from hash-table. Does nothing if there is no entry for key in hash-table.

Function: clrhash hash-table

This function removes all entries from hash-table, leaving it empty.

Function: maphash function hash-table

This function maps function over entries in hash-table, calling it with two args, each key and value in the hash table.

function may not modify hash-table, with the one exception that function may remhash or puthash the entry currently being processed by function.