mirror of
https://github.com/janet-lang/janet
synced 2024-11-25 01:37:19 +00:00
Tweak update docs
This commit is contained in:
parent
4f2d1cdc00
commit
c56b876bfe
@ -1399,9 +1399,9 @@
|
|||||||
ds)
|
ds)
|
||||||
|
|
||||||
(defn update
|
(defn update
|
||||||
`Accepts a key argument and passes its associated value to a function.
|
``Accepts a key argument and passes its associated value to a function.
|
||||||
The key is the re-associated to the function's return value. Returns the updated
|
The key is then re-associated to the function's return value. Returns the updated
|
||||||
data structure ds.`
|
data structure `ds`.``
|
||||||
[ds key func & args]
|
[ds key func & args]
|
||||||
(def old (get ds key))
|
(def old (get ds key))
|
||||||
(put ds key (func old ;args)))
|
(put ds key (func old ;args)))
|
||||||
|
Loading…
Reference in New Issue
Block a user