Liking cljdoc? Tell your friends :D
Clojure only.

noahtheduke.splint.rules.lint.when-not-empty


when-not-empty?clj

seq returns nil when given an empty collection. empty? is implemented as (not (seq coll)) so it's best and fastest to use seq directly.

Examples:

; bad (when-not (empty? ?x) &&. ?y)

; good (when (seq ?x) &&. ?y)

`seq` returns `nil` when given an empty collection. `empty?` is implemented as
`(not (seq coll))` so it's best and fastest to use `seq` directly.

Examples:

; bad
(when-not (empty? ?x) &&. ?y)

; good
(when (seq ?x) &&. ?y)
sourceraw docstring

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

× close