Skip to content

Commit 3d8c97a

Browse files
committed
fix name conflict - bound-fn. fixes #225
1 parent 383c0b9 commit 3d8c97a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/clj/clojure/core.clj

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3425,7 +3425,7 @@
34253425
`(binding [*math-context* (java.math.MathContext. ~precision ~@rm)]
34263426
~@body)))
34273427

3428-
(defn bound-fn
3428+
(defn mk-bound-fn
34293429
{:private true}
34303430
[#^clojure.lang.Sorted sc test key]
34313431
(fn [e]
@@ -3436,30 +3436,30 @@
34363436
>=. Returns a seq of those entries with keys ek for
34373437
which (test (.. sc comparator (compare ek key)) 0) is true"
34383438
([#^clojure.lang.Sorted sc test key]
3439-
(let [include (bound-fn sc test key)]
3439+
(let [include (mk-bound-fn sc test key)]
34403440
(if (#{> >=} test)
34413441
(when-let [[e :as s] (. sc seqFrom key true)]
34423442
(if (include e) s (next s)))
34433443
(take-while include (. sc seq true)))))
34443444
([#^clojure.lang.Sorted sc start-test start-key end-test end-key]
34453445
(when-let [[e :as s] (. sc seqFrom start-key true)]
3446-
(take-while (bound-fn sc end-test end-key)
3447-
(if ((bound-fn sc start-test start-key) e) s (next s))))))
3446+
(take-while (mk-bound-fn sc end-test end-key)
3447+
(if ((mk-bound-fn sc start-test start-key) e) s (next s))))))
34483448

34493449
(defn rsubseq
34503450
"sc must be a sorted collection, test(s) one of <, <=, > or
34513451
>=. Returns a reverse seq of those entries with keys ek for
34523452
which (test (.. sc comparator (compare ek key)) 0) is true"
34533453
([#^clojure.lang.Sorted sc test key]
3454-
(let [include (bound-fn sc test key)]
3454+
(let [include (mk-bound-fn sc test key)]
34553455
(if (#{< <=} test)
34563456
(when-let [[e :as s] (. sc seqFrom key false)]
34573457
(if (include e) s (next s)))
34583458
(take-while include (. sc seq false)))))
34593459
([#^clojure.lang.Sorted sc start-test start-key end-test end-key]
34603460
(when-let [[e :as s] (. sc seqFrom end-key false)]
3461-
(take-while (bound-fn sc start-test start-key)
3462-
(if ((bound-fn sc end-test end-key) e) s (next s))))))
3461+
(take-while (mk-bound-fn sc start-test start-key)
3462+
(if ((mk-bound-fn sc end-test end-key) e) s (next s))))))
34633463

34643464
(defn repeatedly
34653465
"Takes a function of no args, presumably with side effects, and returns an infinite

0 commit comments

Comments
 (0)