Liking cljdoc? Tell your friends :D
Clojure only.

noahtheduke.splint.rules.style.prefer-vary-meta


prefer-vary-metaclj

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)
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close