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