Closed blosavio closed 2 hours ago
Bug fixed in version 2-SNAPSHOT5.
(valid-collections? [42] [#(get % 0)])
;; => true
(valid-collections? {:x 42} {:foo #(get % :x)})
;; => true
Replaced
(every? #(true? ...) ...)
with
(empty? (only-invalid ...))
idiom.
Regarding: version 2SNAPSHOT-4
Background: The API documentation for
valid-collections?
statesObservation: Collection predicates that return a non-boolean are not regarded as valid, even through they are truthy.
Expected output:
Comment:
validate-collections
, the underlying function, handles this case as expected.Also, coercing that same predicate's output to a boolean produces the expected result.
Approach: Remove the current implementation's
(true? ...)
.