On Wed, Aug 11, 2010 at 4:53 PM, Kent <squi...@aol.com> wrote:
> Hi,
>
> Is it safe to assume that the values returned from (keys mp) and (vals
> mp) will be in the same order? In other words, will (zipmap (keys mp)
> (vals mp)) always return mp?
>
> My experience has been that this does work, and it seems very
> reasonable that it should work, but I don't see it documented anywhere
> and I don't want to write a bunch of code that assumes it will work
> and then have that code break in the future.

keys, vals, and seq all do walk the map in the same order.

I believe this is promised, though I agree having it in the
docstring of keys and vals would be nice.

--Chouser
http://joyofclojure.com/

-- 
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

Reply via email to