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 builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |