not-every? takes a one-argument predicate and a collection, applies the predicate to the elements, and returns true when not every result is truthy. It is equivalent to negating every? on the same inputs. section 8.1.5
Its contract includes:
- The predicate may return any value; Clojure truthiness determines whether each result counts as true. section 8.1.5
- The collection must support seq; unsupported inputs, including transients, raise IllegalArgumentException. section 8.1.5
- The result is always true or false. section 8.1.5
- An empty collection makes every? true, so not-every? returns false. section 8.1.5
Testing whether all values are negative
(not-every? neg? [-1 -2 0 -3]) ;; true The result is true because 0 does not satisfy neg?.
