Liking cljdoc? Tell your friends :D
Clojure only.

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


if-nil-elseclj

Idiomatic if defines both branches. when-not returns nil in the truthy branch.

Examples:

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

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

Idiomatic `if` defines both branches. `when-not` returns `nil` in the truthy branch.

Examples:

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

; good
(when-not (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