3 ms·
Yes, you can: > (write (make-hash-table :initial-contents '((a . b) (c . d)))) #S(HASH-TABLE :TEST FASTHASH-EQL (C . D) (A . B)) If you wrote the out
by derleth 16y ago
Yes, you can:
> (write (make-hash-table :initial-contents '((a . b) (c . d))))
#S(HASH-TABLE :TEST FASTHASH-EQL (C . D) (A . B))
If you wrote the output to a file and used read to input that file, you'd get precisely the same hash table back into your program.
(That's Common Lisp. Scheme might be different.)
- pmarin 16y agoDoes hash tables stores only values or they can store other data structures? What happen when they store references to other data structures? In Tcl, list and dict always are values so their string representation is already a serialization.