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 is a website building & hosting documentation for Clojure/Script libraries

× close