• (positions pred coll)
Returns a lazy sequence containing the positions at which pred
is true for items in coll.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/seq_utils.clj:228 top

(defn positions
  "Returns a lazy sequence containing the positions at which pred
   is true for items in coll."
  [pred coll]
  (for [[idx elt] (indexed coll) :when (pred elt)] idx))
Vars in clojure.contrib.seq-utils/positions: defn for
Used in 0 other vars

Comments top

No comments for positions. Log in to add a comment.