Package: alexandria

Function copy-hash-table

Lambda List

copy-hash-table (table &key key test size rehash-size rehash-threshold)

Arguments

table -- a hash table
key -- a function designator. The default is identity
test -- a designator for one of the functions eq, eql, equal, or equalp. The default is eql.
size -- a non-negative integer. The default is implementation-dependent.
rehash-size -- a real of type (or (integer 1 *) (float (1.0) *)). The default is implementation-dependent.
rehash-threshold -- a real of type (real 0 1). The default is implementation-dependent.

Return Value

A copy of the hash table table.

Details

Returns a copy of hash table table, with the same keys and values as table.

The copy has the same properties as the original, unless overridden by the keyword arguments. Before each of the original values is set into the new hash table, the function key is invoked on the value. As key defaults to identity, a shallow copy is returned by default.