From 7b4b8e18c0d28e03e7c66f54bc441ef355ceb5ed Mon Sep 17 00:00:00 2001 From: Rich Hickey Date: Sat, 1 May 2010 15:04:02 -0400 Subject: removed seq-contains? --- src/clj/clojure/core.clj | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src') 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." -- cgit v1.2.3-18-g5258