- dict-update! dto dict key updater #!optional failure successprocedure
Retrieves the value of key as if by dict-ref, invokes updater on it, and sets the value of key to be the result of calling updater as if by dict-set!, but may do so more efficiently. Returns the updated dictionary.
(dict-update! dto dict 1 (lambda (x) (+ 1 x))) ⇒ ((1 . 3) (3 . 4) (5 . 6)) (dict-update! dto dict 2 (lambda (x) (+ 1 x))) ⇒ error