Add lisp-implementation-version
[jscl.git] / src / hash-table.lisp
index 2488d1b..301addd 100644 (file)
                ,g!new-value)              
             `(gethash ,g!new-value ,g!key ,g!hash-table)    ; accessing form
             )))
+
+
+(defun remhash (key hash-table)
+  (let ((obj (caddr hash-table))
+        (hash (funcall (cadr hash-table) key)))
+    (prog1 (in hash obj)
+      (delete-property hash obj))))
+
+
+(defun hash-table-count (hash-table)
+  (let ((count 0))
+    (map-for-in (lambda (x)
+                  (declare (ignore x))
+                  (incf count))
+                (caddr hash-table))
+    count))