ClojureDocs

导航

命名空间

更新

clojure.core

从 1.7 起可用 ()
  • (update m k f)
  • (update m k f x)
  • (update m k f x y)
  • (update m k f x y z)
  • (update m k f x y z & 更多)
'Updates' a value in an associative structure, where k is a
key and f is a function that will take the old value
and any supplied args and return the new value, and returns a new
structure.  If the key does not exist, nil is passed as the old value.