nested-hashπ i
Provides hash-ref and hash-set variants that operate on nested hash tables, that is, a hash table inside a hash table.
key...+
[ #:defaultdefault]) → any?
Accesses a hash table recursively using the given keys. default is returned if a key does not exist. An error is raised if an access is performed on a non-hash entry.
key...+
value
[ #:hashhash]) → any?
Functionally edits a hash table using the given keys and value. Non-existent keys will automatically become new subtables. Existing intermediate keys that are associated with non-hash values will raise an error.
The #:hash keyword specifies a constructor for creating new nested hash tables.
Examples:
'#hash((a. #hash((b. 123))))
Similarly to the previous functions we have similar functions that take actual lists instead of inline-lists. These may be useful to avoid using apply when generating lists of accesses.
keys
[ #:defaultdefault]) → any?
Accesses a hash table recursively using the given keys. default is returned if a key does not exist. An error is raised if an access is performed on a non-hash entry.
keys
value
[ #:hashhash]) → any?
Functionally edits a hash table using the given keys and value. Non-existent keys will automatically become new subtables. Existing intermediate keys that are associated with non-hash values will raise an error.
The #:hash keyword specifies a constructor for creating new nested hash tables.
Examples:
'#hash((a. #hash((b. 123))))