Skip to content

Instantly share code, notes, and snippets.

@mecdemort
Created May 1, 2011 00:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mecdemort/950133 to your computer and use it in GitHub Desktop.
Save mecdemort/950133 to your computer and use it in GitHub Desktop.
(defn seqable? [x]
(or (instance? clojure.lang.ISeq x)
(instance? clojure.lang.Seqable x)
(instance? Iterable x)
(instance? CharSequence x)
(instance? java.util.Map x)
(nil? x)
(.. x getClass isArray)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment