2010/9/21 Phil Hagelberg <p...@hagelb.org> > On Mon, Sep 20, 2010 at 7:15 PM, David Cabana <drcab...@gmail.com> wrote: > >> > > The fact that currently having vals and keys return seqs in the same > >> > order is not guaranteed by the documentation ? > > > > At the recent Pragmatic Studio class I asked Rich and Stuart about > > this very point. As I recall, Rich said vals and keys do behave as one > > would hope, so that for a map m we can count on (zipmap (keys m) (vals > > m)) being equal to m. Again, as I recall the plan is to eventually > > update the documentation to reflect this. > > I think it's guaranteed within a given map instance, but if you dissoc > something out from it or get a new map based on the old one in some > way then all bets are off. >
So (= m1 m2) may not imply (= (zipmap (keys m1) (vals m1)) (zipmap (keys m2) (vals m2))) for any (m1, m2), hmmm, good to remember somewhere in my head ... :) -- 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