Liking cljdoc? Tell your friends :D
Clojure only.

noahtheduke.splint.rules.lint.if-else-nil


if-else-nilclj

Idiomatic if defines both branches. when returns nil in the else branch.

Examples:

; bad (if (some-func) :a nil)

; good (when (some-func) :a)

Idiomatic `if` defines both branches. `when` returns `nil` in the else branch.

Examples:

; bad
(if (some-func) :a nil)

; good
(when (some-func) :a)
sourceraw docstring

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