(contains? coll v)
Returns true if key is present in the given collection, otherwise
returns false. Note that for numerically indexed collections like
vectors and 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 'some'.
Source
(defn
contains?
"Returns true if key is present in the given collection, otherwise\n returns false. Note that for numerically indexed collections like\n vectors and arrays, this tests if the numeric key is within the\n range of indexes. 'contains?' operates constant or logarithmic time;\n it will not perform a linear search for a value. See also 'some'."
[coll v]
(if
(identical? (get coll v lookup-sentinel) lookup-sentinel)
false
true))