ClojureDocs

Nav

Namespaces

core.async
core.logic
data.csv
spec.alpha
tools.build
  • clojure
tools.deps

contains?

clojure.core

Available since 1.0 (source) Clojure/JVMClojureScriptbabashka
  • (contains? coll key)
Returns true if key is present in the given collection, otherwise
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 'some'.