File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 986986~~~
987987
988988
989+ <a name =" del-tab " ></a >
990+
991+ ### Deleting a Hash Table
992+
993+ Use
994+ [ ` clrhash ` ] ( http://www.lispworks.com/documentation/HyperSpec/Body/f_clrhas.htm )
995+ to delete a hash table. This will remove all of the data from the hash table and return the deleted table.
996+
997+ ~~~ lisp
998+ CL-USER> (defparameter *my-hash* (make-hash-table))
999+ *MY-HASH*
1000+ CL-USER> (setf (gethash 'first-key *my-hash*) 'one)
1001+ ONE
1002+ CL-USER> (setf (gethash 'second-key *my-hash*) 'two)
1003+ TWO
1004+ CL-USER> *my-hash*
1005+ #<hash-table :TEST eql :COUNT 2 {10097BF4E3}>
1006+ CL-USER> (clrhash *my-hash*)
1007+ #<hash-table :TEST eql :COUNT 0 {10097BF4E3}>
1008+ CL-USER> (gethash 'first-key *my-hash*)
1009+ NIL
1010+ NIL
1011+ CL-USER> (gethash 'second-key *my-hash*)
1012+ NIL
1013+ NIL
1014+ ~~~
1015+
1016+
9891017<a name =" traverse " ></a >
9901018
9911019### Traversing a Hash Table
You can’t perform that action at this time.
0 commit comments