From: Leslie P. P. <les...@gm...> - 2008-07-12 20:48:27
|
> (defparameter *hash1* (make-hash-table)) > [...] > I would like to know if it is possible to create such hash table like in > perl: > %hash1 = qw(paris france lyons france ......); (defun plist->hash-table (plist &optional ht (make-hash-table)) (loop for (key value) in plist do (setf (gethash key ht) value)) finally (return ht))) (plist->hash-table '(paris france lyons france bordeaux france) *hash1*) untested Leslie -- My personal blog: http://blog.viridian-project.de/ |