associative?

clojure.core

  • (associative? coll)
Returns true if coll implements Associative

1 Example top

  • user=> (associative? [1 2 3]) ; vector
    true
    user=> (associative? '(1 2 3)) ; list
    false
    user=> (associative? {:a 1 :b 2}) ; map
    true
    user=> (associative? #{:a :b :c}) ; set
    false
    user=> (associative? "fred") ; string
    false
    
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:5485 top

(defn associative?
 "Returns true if coll implements Associative"
 {:added "1.0"
  :static true}
  [coll] (instance? clojure.lang.Associative coll))
Vars in clojure.core/associative?:
Used in 0 other vars

Comments top

No comments for associative?. Log in to add a comment.