put
is not for hash tables. What you want is puthash
.
(puthash KEY VALUE TABLE)
Associate KEY with VALUE in hash table TABLE.
Also you cannot just use puthash
on nil, you need to actually create a hash table first with make-hash-table
. If you want to use strings as the has keys make sure you pass :test 'equal
to make-hash-table
.
For all the information you need to use hash tables you can consult this part of the manual.
put
is for storing properties on a symbol, not the symbols value. You can read more about what put actually does here. It's extremely rare that you would actually ever need to use put
for something.