Liking cljdoc? Tell your friends :D
Clojure only.

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


if-let-else-nilclj

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

Examples:

; bad (if-let [a 1] a nil)

; good (when-let [a 1] a)

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

Examples:

; bad
(if-let [a 1] a nil)

; good
(when-let [a 1] 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