I attached another patch to the ticket.  It builds up the answer from the
empty map {} if the argument is a record (as the current select-keys does),
but from (empty map) if it is not a record, so it will preserve sortedness
of the argument.  Not sure if there are any other cases that are a problem,
or if it does what everyone would expect, but it should be closer.

    http://dev.clojure.org/jira/browse/CLJ-1287

Andy


On Sat, Nov 2, 2013 at 6:07 AM, Alex Miller <a...@puredanger.com> wrote:

> > One other point:
> > Sometimes people use sorted maps and array maps specifically for
> scenarios in which the keys are not hashable and therefore hash maps would
> not apply.  Dumping the contents into a regular map in such cases doesn't
> make much sense.
>
> Everything is hashable, not sure what a non-hashable key means. Array maps
> use the hash of the key to determine the array bucket. If you get the hash
> code of a sorted map, it will get the hash of all keys and values.
>
> --
> --
> 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
> ---
> 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 clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
-- 
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
--- 
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 clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to