Clojure: finding out if a collection is seq-able

Viewed 4404

So there's list?, seq?, vector?, map? and so on to determine what type of collection the argument is.

What's a good way of telling the difference between

  • a map (i.e. something that contains key-value pairs)
  • a collection (i.e. something that contains values)
  • a non collection value like a string.

Is there a better way than

#(or (seq? %) (list? %) etc)
4 Answers
Related