Yes, it is guaranteed, and I'm dubious about your claim about serializing. (seq foo) will return the entries in foo in the same order always; but (seq (assoc foo 1 2)) may return the entries in a completely different order. You can treat (keys x) as if it were defined by (map key (seq x)):
user=> (let [x (meta #'first)] (= (keys x) (map key x))) true On Feb 22, 4:17 pm, Mike Meyer <m...@mired.org> wrote: > On Tue, 22 Feb 2011 15:36:02 -0800 (PST) > > Daniel Bell <dchristianb...@gmail.com> wrote: > > I can't think of anything core, but > > > (let [f #(. % toUpperCase)] > > (zipmap (keys skills) (map f (vals skills)))) doesn't seem too bad. > > Does clojure guarantee that keys & vals return things in the proper > order for this to work? Since it doesn't guarantee that serializing > the entries of a map will always get the same order, that seems > unlikely. > > thanks, > <mike > -- > Mike Meyer <m...@mired.org> http://www.mired.org/consulting.html > Independent Software developer/SCM consultant, email for more information. > > O< ascii ribbon campaign - stop html mail -www.asciiribbon.org -- 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