summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/clj/clojure/core.clj11
-rw-r--r--test/clojure/test_clojure/sequences.clj4
2 files changed, 1 insertions, 14 deletions
diff --git a/src/clj/clojure/core.clj b/src/clj/clojure/core.clj
index df319026..6b0fbbbf 100644
--- a/src/clj/clojure/core.clj
+++ b/src/clj/clojure/core.clj
@@ -1017,8 +1017,7 @@
returns false. Note that for numerically indexed collections like
vectors and Java arrays, this tests if the numeric key is within the
range of indexes. 'contains?' operates constant or logarithmic time;
- it will not perform a linear search for a value. See also
- 'seq-contains?' and 'some'."
+ it will not perform a linear search for a value. See also 'some'."
[coll key] (. clojure.lang.RT (contains coll key)))
(defn get
@@ -5115,14 +5114,6 @@
[coll]
(nth coll (rand-int (count coll))))
-(defn seq-contains?
- "Returns true if sequential search of coll contains something equal (with =) to x,
- in linear time."
- {:added "1.2"}
- [coll x]
- (if (some (fn [y] (= y x)) coll)
- true false))
-
(defn partition-all
"Returns a lazy sequence of lists like partition, but may include
partitions with fewer than n items at the end."
diff --git a/test/clojure/test_clojure/sequences.clj b/test/clojure/test_clojure/sequences.clj
index 5c71e174..a8db5cb5 100644
--- a/test/clojure/test_clojure/sequences.clj
+++ b/test/clojure/test_clojure/sequences.clj
@@ -1147,10 +1147,6 @@
(let [elt (rand-nth [:a :b :c :d])]
(is (#{:a :b :c :d} elt))))
-(deftest test-seq-contains?
- (is (seq-contains? [1 2 3 4 5] 5))
- (is (not (seq-contains? [1 2 3 4 5] 6))))
-
(deftest test-partition-all
(is (= (partition-all 4 [1 2 3 4 5 6 7 8 9])
[[1 2 3 4] [5 6 7 8] [9]]))