1.3.0 permalink Arrow_down_16x16

first

clojure.core

  • (first coll)
Returns the first item in the collection. Calls seq on its
argument. If coll is nil, returns nil.

2 Examples top

  • user=> (first '(:alpha :bravo :charlie))
    :alpha
  • user=> (first nil)
    nil
    user=> (first [])
    nil
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:49 top

(def
 ^{:arglists '([coll])
   :doc "Returns the first item in the collection. Calls seq on its
    argument. If coll is nil, returns nil."
   :added "1.0"
   :static true}
 first (fn ^:static first [coll] (. clojure.lang.RT (first coll))))
Vars in clojure.core/first:
Used in 0 other vars

Comments top

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