Package: alexandria

Function hash-table-alist

Lambda List

hash-table-alist (table)

Arguments

table -- a hash table

Return Value

an association list

Details

Generates an association list from a hash table.

Returns an association list containing the keys and values of the hash table table.

Examples

(defvar table (make-hash-table)) => TABLE
(setf (gethash 'Germany table) 'Berlin) => BERLIN
(setf (gethash 'France table) 'Paris) => PARIS
(setf (gethash 'Britain table) 'London) => LONDON
(hash-table-alist table)
 => ((FRANCE . PARIS) (BRITAIN . LONDON) (GERMANY . BERLIN))    
 

See also