hariszaman
hariszaman

Reputation: 8424

OR multiple filtering clojure

There is a function in clojure every-pred that checks for multiple filtering

(every-pred integer? pos?)

Is there any function that could check if the sequence has true for predicate1 or predicate2

(or predicate1? predicate2?)

Upvotes: 2

Views: 361

Answers (1)

DaoWen
DaoWen

Reputation: 33019

I think you're looking for some-fn:

(filter (some-fn predicate-1? predicate-2?) [x y z])

Note that if you look up every-pred on ClojureDocs.org, some-fn is listed in the "See Also" section.

Upvotes: 3

Related Questions