not-any? answers whether no element in a collection satisfies a predicate. It is equivalent to negating some on the same predicate and collection, and always returns true or false. section 8.1.5
The function accepts:
- pred, a one-argument function; any returned value is interpreted using Clojure truthiness. section 8.1.5
- coll, a collection usable with seq, including standard Clojure collections, arrays, and java.util.Collection types. section 8.1.5
- A collection that does not support the sequential interface causes IllegalArgumentException; transients are the standard-library exception. section 8.1.5
Checking that no value matches
(not-any? neg? [1 2 0 3]) ;; true No element is negative, so not-any? returns true. The complementary query, (some neg? [1 2 0 3]), would indicate whether at least one element satisfies neg?. section 8.1.5
