projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Add hash-table-count function
[jscl.git]
/
src
/
hash-table.lisp
diff --git
a/src/hash-table.lisp
b/src/hash-table.lisp
index
0641ca8
..
301addd
100644
(file)
--- a/
src/hash-table.lisp
+++ b/
src/hash-table.lisp
@@
-106,3
+106,12
@@
(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))