ClojureDocs

Nav

Namespaces

some

clojure.core

Available since 1.0 (source)
  • (some pred coll)
Returns the first logical true value of (pred x) for any x in coll,
else nil.  One common idiom is to use a set as pred, for example
this will return :fred if :fred is in the sequence, otherwise nil:
(some #{:fred} coll)