Maybe I'm just paranoid, or maybe I'm missing something, but there are some 
facts about maps that I believe to be true in general, that I'd like to 
count on, and that as far as I can tell are not explicitly documented as 
being true. What it comes down to is whether the same (identical, not just 
same contents) map will be sequenced in a repeatable way. (I realize that 
the sequence can't be predicted from the contents.) For example, is it 
guaranteed that:

(keys m) and (vals m) will have always have corresponding items in 
corresponding positions
(= (seq m) (seq m))
(= (vec m) (vec m))
etc.

Is there a guarantee that's implied by other guaranteed facts, or is the 
status of these really undefined? I'm pretty sure implementations in 
general are going to behave according to my expectations, but I'm 
interested in the question of whether it can be relied on.

Looking at documentation and online discussion, including some about the 
underlying Java, it appears to me that the behavior isn't actually 
guaranteed. I'm hoping someone will tell me why I'm wrong.

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to