Do not rely on specific types of Clojure data structures. They are undocumented implementation details, and you have no guarantee that they will not change in future versions of Clojure.
it is much safer to rely on abstractions (for example, as defined by the IPersistentList or ISeq ). They are much less likely to change in ways that can break your code (I understand that Rich Hickey is very great for backward compatibility when it comes to abstractions. If you are dependent on a particular implementation, I think he will say it with his own mistake if all will break)
But even better , you should use functions in clojure.core like seq? or list? , depending on what exactly you want to find. Not only can they maintain backward compatibility for a long time, they also have the ability to work correctly with versions other than the JVM Clojure (e.g. ClojureScript).
source share