clodoc » clojure.contrib.core/seqable?

Returns true if (seq x) will succeed, false otherwise.
(defn seqable?
  "Returns true if (seq x) will succeed, false otherwise."
  [x]
  (or (seq? x)
      (instance? clojure.lang.Seqable x)
      (nil? x)
      (instance? Iterable x)
      (-> x .getClass .isArray)
      (string? x)
      (instance? java.util.Map x)))

Running Clodoc a92beda6 on Clojure 1.3.0
(C) 2010-2011 Jan Stępień
API Issues
Fork me on GitHub