As, Patrick Sullivan, said, the built-in sorted-map guarantees that
the keys will be in order.  I'm probably missing something here, but
wouldn't that fit the bill?

http://clojure.org/api#sorted-map

Rob Lachlan

On Aug 27, 12:35 pm, Howard Lewis Ship <hls...@gmail.com> wrote:
> Is the order of keys in a map predictable?  I have some tests I'm
> concerned about, where the keys and values in a map are converted to a
> string (ultimately, a URL, as query parameters) and the order will
> affect the output string.
>
> I could sort the keys, but then I'm changing my code to support the
> test in a somewhat non-trivial way.
>
> Literally: when iterating over the key/value pairs, the order seems to
> be the order in which the key/values are defined in the map. Is this
> true?
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!

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