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