chickadee » persistent-hash-map » map-ref-in

map-ref-in map keys #!optional not-foundprocedure

Recursively looks up the list of keys in the nested map and returns the value associated with the innermost key or not-found (default #f) if one of the keys does not exist.

Example:

(define m (persistent-map 'foo (persistent-map 'bar (persistent-map 'qux 123))))

(map-ref-in m '(foo bar qux)) => 123
(map-ref-in m '(foo qux))     => #f