rename any? to avoid conflict with clojure 1.9
This commit is contained in:
parent
2673004b5b
commit
6a5d0f7560
1 changed files with 13 additions and 13 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Reference in a new issue