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)
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 |