From 6a5d0f7560e4d2f8a245337f62613b0c66c347e1 Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Wed, 7 Sep 2016 07:54:10 -0400 Subject: [PATCH] rename any? to avoid conflict with clojure 1.9 --- src/clj/com/rpl/specter/impl.cljc | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/clj/com/rpl/specter/impl.cljc b/src/clj/com/rpl/specter/impl.cljc index 7c78f01..231f789 100644 --- a/src/clj/com/rpl/specter/impl.cljc +++ b/src/clj/com/rpl/specter/impl.cljc @@ -527,7 +527,7 @@ (with-meta ret (meta structure)) ret)))) -(defn any? +(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] @@ -544,18 +544,18 @@ (eval `(let [~@lv] ~body))))) - (let [embeddable? (any? number? - symbol? - keyword? - string? - char? - list? - vector? - set? - #(and (map? %) (not (record? %))) - nil? - #(instance? clojure.lang.Cons %) - #(instance? clojure.lang.LazySeq %))] + (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 %))] (defn eval+ "Automatically extracts non-evalable stuff into a closure and then evals" [form]