You're viewing version 1.2.0 of seq?. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16
  • (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:131 top

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

Comments top

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