ClojureDocs

导航

命名空间

some

clojure.core

自 1.0 起可用 (源代码)
  • (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)