aget for hashtables
Wed Jun 25 18:27:23 PDT 2008 Ryszard Szopa <ryszard.szopa@gmail.com>
* aget for hashtables
diff -rN -u old-cl-couch/client/utils.lisp new-cl-couch/client/utils.lisp
--- old-cl-couch/client/utils.lisp 2014-07-30 22:26:27.000000000 -0700
+++ new-cl-couch/client/utils.lisp 2014-07-30 22:26:27.000000000 -0700
@@ -29,6 +29,12 @@
(cdr x)
(consp x))))
+(defmethod aget (key (hash hash-table))
+ (gethash key hash))
+
+(defmethod (setf aget) (value key (hash hash-table))
+ (setf (gethash key hash) value))
+
(defmethod (setf aget) (value key (alist list))
(if (null (assoc key alist))
(progn