My understanding is that everything (all data-structures) is coll?
(obviously not strings)
lists and vectors are sequential? (and coll?)
sets are only coll?
maps are map? (and coll?)
All seq? are sequential?
Yes and also coll?
All sequential? are coll?
Well yeah but not only...all persistent data-structures are coll? which
means that map? is also coll?
basically coll? is the top-level one, right? It tests whether something
implements 'Collection' (all clojure data-structures do)
Jim
On 26/11/12 14:01, Mark Engelberg wrote:
I understand that these functions test for different interfaces, but I
don't have a clear sense for which things respond differently to these
predicates. Has anyone compiled a little table of what things satisfy
which predicates?
So far, I've figured out that although lists, strings, vectors, and
sets all can seq:
lists are seq?, sequential? and coll?
vectors are not seq?, are sequential? and coll?
sets are not seq? and not sequential?, but are coll?
strings are not seq?, sequential? or coll?
From these examples, it appears that:
All seq? are sequential?
All sequential? are coll?
Is this really true, or have I just not found enough edge cases?
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient
with your first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en