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 builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close