You're viewing version 1.2.0 of list?. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

list?

clojure.core

  • (list? x)
Returns true if x implements IPersistentList

1 Example top

  • user=> (list? '(1 2 3))
    true
    user=> (list? (list 1 2))
    true
    user=> (list? 0)
    false
    user=> (list? {})
    false
    user=> (list? [])
    false
    user=> (list? (range 10))
    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:4973 top

(defn list?
  "Returns true if x implements IPersistentList"
  {:added "1.0"}
  [x] (instance? clojure.lang.IPersistentList x))
Vars in clojure.core/list?: defn instance?

Comments top

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