From 03493cf9caf3ed1638badeb6ae994135324f13d3 Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Wed, 7 Sep 2016 15:19:50 -0400 Subject: [PATCH] replace any-pred? with core function some-fn --- CHANGES.md | 2 +- src/clj/com/rpl/specter/impl.cljc | 30 ++++++++++++------------------ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index f431f7a..179e25f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ ## 0.13.1-SNAPSHOT -* Rename any? in com.rpl.specter.impl to avoid conflict with Clojure 1.9 +* Remove any? in com.rpl.specter.impl to avoid conflict with Clojure 1.9 ## 0.13.0 diff --git a/src/clj/com/rpl/specter/impl.cljc b/src/clj/com/rpl/specter/impl.cljc index 231f789..db33af2 100644 --- a/src/clj/com/rpl/specter/impl.cljc +++ b/src/clj/com/rpl/specter/impl.cljc @@ -527,12 +527,6 @@ (with-meta ret (meta structure)) ret)))) -(defn any-pred? - "Accepts any number of predicates that take in one input and returns a new predicate that returns true if any of them are true" - [& preds] - (fn [obj] - (some #(% obj) preds))) - #?(:clj (do @@ -544,18 +538,18 @@ (eval `(let [~@lv] ~body))))) - (let [embeddable? (any-pred? number? - symbol? - keyword? - string? - char? - list? - vector? - set? - #(and (map? %) (not (record? %))) - nil? - #(instance? clojure.lang.Cons %) - #(instance? clojure.lang.LazySeq %))] + (let [embeddable? (some-fn number? + symbol? + keyword? + string? + char? + list? + vector? + set? + #(and (map? %) (not (record? %))) + nil? + #(instance? clojure.lang.Cons %) + #(instance? clojure.lang.LazySeq %))] (defn eval+ "Automatically extracts non-evalable stuff into a closure and then evals" [form]