(rontolisp) docs
← Maps, sets and vectors

update

(update m k f args...)

Answers a fresh map with k rewritten to (apply f (get m k) args...). A missing key applies f to nil (which signals for arithmetic, like the oracle). A vector is updated by index like assoc, the index equal to the count appending. As a value a map, a key, a function and any extra arguments.