--- old-alexandria/hash-tables.lisp	2008-03-10 14:01:55.000000000 +0100
+++ new-alexandria/hash-tables.lisp	2008-03-10 14:01:55.000000000 +0100
@@ -1,18 +1,22 @@
 (in-package :alexandria)
 
 (defun copy-hash-table (table &key
+			(copy-fn 'identity)
                         (test (hash-table-test table))
                         (size (hash-table-size table))
                         (rehash-size (hash-table-size table))
                         (rehash-threshold (hash-table-rehash-threshold table)))
-  "Returns a shallow copy of hash table TABLE, with the same keys and values
+  "Returns a copy of hash table TABLE, with the same keys and values
 as the TABLE. The copy has the same properties as the original, unless
-overridden by the keyword arguments."
+overridden by the keyword arguments.
+
+The values are copied by calling COPY-FN which defaults to CL:IDENTITY;
+thus a shallow copy is returned by default."
   (let ((copy (make-hash-table :test test :size size
                                :rehash-size rehash-size
                                :rehash-threshold rehash-threshold)))
     (maphash (lambda (k v)
-               (setf (gethash k copy) v))
+               (setf (gethash k copy) (funcall copy-fn v)))
              table)
     copy))
 

