malli
malli copied to clipboard
Incorrect base case for `-some-pred`
This should return false in Clojure. In ClojureScript it returns true.
((-some-pred []) true) ;=> true
I think this line needs to be configurable. https://github.com/metosin/malli/blob/bf92680ad76e57697261dd45c52dd31ffa9a8e1e/src/malli/impl/util.cljc#L59
I believe this is just morally incorrect since :or always has non-empty children (so preds are always non-empty).
or should it return true also in clojurescript? would be consistent with -every-pred. In clojure, every-fn and some-fn are not defined with zero predicates.
;; clj
((-every-pred []) 1) ; => true
((-some-pred []) 1) ; => true
;; cljs
((-every-pred []) 1) ; => true
((-some-pred []) 1) ; => false