Created
November 30, 2016 09:00
-
-
Save zhouqiang-cl/db8f2b2608ef3c916b5a8df1554830a4 to your computer and use it in GitHub Desktop.
common lisp 的函数 HASH-TABLE-COUNT
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
语法 | |
hash-table-count hash-table => count | |
参数和值 | |
hash-table --- 一个 hash table | |
count --- 一个正整数 | |
描述 | |
返回 hash-table 的大小, 如果hash-table 刚刚被创建, 那 count 为0 | |
代码 | |
* (setq table (make-hash-table)) | |
#<HASH-TABLE :TEST EQL :COUNT 0 {1004A9A1B3}> | |
* (hash-table-count table) | |
0 | |
* (setf (gethash 57 table) "fifty-seven") | |
"fifty-seven" | |
* (hash-table-count table) | |
1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment