You're viewing version 1.2.0 of find. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (find map key)
Returns the map entry for key, or nil if key not present.

2 Examples top

  • user=> (find {:b 2 :a 1 :c 3} :d)
    nil 
    
    user=> (find {:b 2 :a 1 :c 3} :a)
    [:a 1] 
    
    
  • user=> (find [:a :b :c :d] 2)
    [2 :c]
    
    user=> (find [:a :b :c :d] 5)
    nil
Log in to add / edit an example.

See Also top

  • 0
    clojure.core/get

    Returns the value mapped to key, not-found or nil if key not present.

  • 0
    clojure.core/get-in

    Returns the value in a nested associative structure, where ks is a

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:1192 top

(defn find
  "Returns the map entry for key, or nil if key not present."
  {:added "1.0"}
  [map key] (. clojure.lang.RT (find map key)))
Vars in clojure.core/find: defn key map
Used in 4 other vars find-var re-find re-seq lazy-get

Comments top

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