aboutsummaryrefslogtreecommitdiff
path: root/src/clojure
diff options
context:
space:
mode:
authorAaron Bedra and Stuart Halloway <pair@thinkrelevance.com>2009-08-23 15:05:10 -0400
committerAaron Bedra and Stuart Halloway <pair@thinkrelevance.com>2009-08-23 15:05:10 -0400
commit04666031b885d8e9553e242ea704e4a921accf5b (patch)
treefcb6ad997fde688971fa20b4e4c13acc0bf7f504 /src/clojure
parentb70cba0c656586836a3c951079012cd9d371fa40 (diff)
expect: remove indexes in favor of seq-utils/positions
Diffstat (limited to 'src/clojure')
-rw-r--r--src/clojure/contrib/expect/util.clj8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/clojure/contrib/expect/util.clj b/src/clojure/contrib/expect/util.clj
index a5b018c1..14bd6d16 100644
--- a/src/clojure/contrib/expect/util.clj
+++ b/src/clojure/contrib/expect/util.clj
@@ -9,13 +9,7 @@
(when more
(list* `assert-args fnname more)))))
-(defn indexes
- "Returns a lazy sequence of the indexes in coll for which the element
-is equal to v."
- [coll v]
- (map #(first %) (filter (fn [[i el]] (= el v)) (indexed coll))))
-
(defn index-of
"Returns the first index of value v in the collection or nil."
[coll v]
- (first (indexes coll v)))
+ (first (positions v coll)))