Actually, http://dev.clojure.org/jira/browse/CLJ-1302 "keys and vals 
consistency not mentioned in docstring" was declined, with the comment "The 
absence of this property in the docs is correct. You should not rely on 
this."



On Wednesday, August 11, 2010 6:03:39 PM UTC-4, Chouser wrote:
>
> On Wed, Aug 11, 2010 at 4:53 PM, Kent <[email protected] <javascript:>> 
> 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 [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to