From: Matthew Economou
Subject: Copying hash tables
Date: 
Message-ID: <w4oln6ti84y.fsf@nemesis.irtnog.org>
I have a hash table whose values are hash tables themselves.  I've
written the following code to copy this mess, and I'd like to know if
it looks OK or if there's a better way to do it (e.g. with LOOP?):

(setq new-table (make-hash-table))
(maphash #'(lambda (key sub-table)
	     (setf (gethash key new-table) (make-hash-table))
	     (maphash #'(lambda (sub-key val)
			  (setf (gethash sub-key (gethash key new-table)) val))
		      sub-table))
	 old-table))

Any suggestions (readability, performance, etc.), or is this as good
as it gets?

-- 
The Algol compiler used at Case Institute of Technology, after finding
25 errors in the source (e.g., like you spelled BEGIN as BEGNI), would
print "At this point, we suggest you try re-reading the manual."