A boolean operation combines or transforms truth-valued expressions. Clojure provides short-circuiting operators and the single-argument not operator, which reverses boolean meaning. section 3.2
Clojure treats only false and nil as false; every other value is truthy, including 0, the empty string, and the empty list. Predicates may therefore return any type when used by collection logic. section 3.2 section 8.1.5
Collection functions turn boolean operations into practical questions:
- Use every? to ask whether a predicate succeeds for every element; use not-every? for its negation. section 8.1.5
- Use some to find the first non-nil predicate result; use not-any? to test that no element succeeds. section 8.1.5
- These functions accept seq-compatible collections, including standard collections, arrays, and Java collection types; unsupported inputs raise IllegalArgumentException. section 8.1.5
Testing collections and locating a match
(every? pos? [1 2 3 4]) ;; true (some #(when (= "222 231 9008" (:phone %)) %) address-book) ;; {:phone "222 231 9008" :name "Sarah"}
Table 3.1. Common Clojure values and their boolean translation
| Description |
Example |
Boolean Value |
| Number zero |
|
|
| Empty string |
|
|
| Empty list |
|
|
| List of nil |
|
|
| Nil |
|
|
Compare representative Clojure values with their boolean translations, including nil, zero, empty strings, and empty lists. section 3.2



