Liking cljdoc? Tell your friends :D
Clojure only.

noahtheduke.splint.rules.style.prefer-boolean


prefer-booleanclj

Use boolean if you must return true or false from an expression.

Examples:

bad

(if some-val true false) (if (some-func) true false)

good

(boolean some-val) (boolean (some-func))

Use `boolean` if you must return `true` or `false` from an expression.

Examples:

# bad
(if some-val true false)
(if (some-func) true false)

# good
(boolean some-val)
(boolean (some-func))
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close