vary-meta
works like swap!, so no need to access and overwrite in two steps.
Examples:
; bad (with-meta x (assoc (meta x) :filename filename))
; good (vary-meta x assoc :filename filename)
`vary-meta` works like swap!, so no need to access and overwrite in two steps. Examples: ; bad (with-meta x (assoc (meta x) :filename filename)) ; good (vary-meta x assoc :filename filename)
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |