Liking cljdoc? Tell your friends :D
Clojure only.

noahtheduke.splint.rules.lint.assoc-fn


assoc-fnclj

assoc-ing an update with the same key are hard to read. update is known and idiomatic.

Examples:

; bad (assoc coll :a (+ (:a coll) 5)) (assoc coll :a (+ (coll :a) 5)) (assoc coll :a (+ (get coll :a) 5))

; good (update coll :a + 5)

`assoc`-ing an update with the same key are hard to read. `update` is known and
idiomatic.

Examples:

; bad
(assoc coll :a (+ (:a coll) 5))
(assoc coll :a (+ (coll :a) 5))
(assoc coll :a (+ (get coll :a) 5))

; good
(update coll :a + 5)
sourceraw docstring

not-assoc?clj

(not-assoc? sym)
source

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

× close