projects
/
jscl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3565f3
)
Add hash-table-count function
author
David Vázquez
<davazp@gmail.com>
Tue, 25 Feb 2014 23:32:36 +0000
(
00:32
+0100)
committer
David Vázquez
<davazp@gmail.com>
Tue, 25 Feb 2014 23:32:36 +0000
(
00:32
+0100)
src/hash-table.lisp
patch
|
blob
|
history
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))