• (seq? x)
Return true if x implements ISeq

2 Examples top

  • user> (seq? 1)
    false
    user> (seq? [1])
    false
    user> (seq? (seq [1]))
    true
  • ;; contrast to example code for sequential?
    ;;
    user> (seq? '(1 2 3))
    true
    user> (seq? [1 2 3])   ; for sequential?, returns true
    false
    user> (seq? (range 1 5))
    true
    user> (seq? 1)
    false
    user> (seq? {:a 2 :b 1})
    false
    user> 
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:142 top

(def
 ^{:arglists '([x])
   :doc "Return true if x implements ISeq"
   :added "1.0"
   :static true}
 seq? (fn ^:static seq? [x] (instance? clojure.lang.ISeq x)))
Vars in clojure.core/seq?:
Used in 0 other vars

Comments top

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