Zero-arity versions of these fns are useful in situations like the following:
;; compute-preds-for may return zero or many predicate fns
(let [preds (compute-preds-for something)]
(filter (apply every-pred preds) some-coll))
Approach: This patch adds zero-arity versions of every-pred and some-fn with these semantics:
(every-pred) === (constantly true)
(some-fn) === (constantly nil)
Patch: 0001-Add-zero-arity-variants-for-every-pred-and-some-fn.patch
- Patch adds zero-arity version
- Patch reformats docstring to 80 character width (matching other core fns) - comments are identical other than the addition of a final sentence stating behavior with zero-arity.
Screened by: