1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 01:37:19 +00:00

Merge pull request #580 from sogaiu/tweak-update-docs

Tweak update docs
This commit is contained in:
Calvin Rose 2021-01-13 12:26:10 -06:00 committed by GitHub
commit ba92dfcbe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1399,9 +1399,9 @@
ds)
(defn update
`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
data structure ds.`
``Accepts a key argument and passes its associated value to a function.
The key is then re-associated to the function's return value. Returns the updated
data structure `ds`.``
[ds key func & args]
(def old (get ds key))
(put ds key (func old ;args)))