Looks like a reasonable enhancement to me. I have filed ticket CLJ-1287 with a proposed patch for it:
http://dev.clojure.org/jira/browse/CLJ-1287 No guarantees when or if it will get into Clojure. You can modify your own local copy of select-keys (or even alter-var-root its definition) if you would like the new behavior sooner, for yourself. By the way, there is a funjible.set library published on Github that is like clojure.set except it has preconditions that its arguments are sets or maps, the functions have longer more explicit doc strings, and there are a few behavior changes like ensuring metadata or sortedness of return values. https://github.com/jafingerhut/funjible Andy On Thu, Oct 31, 2013 at 7:21 PM, Don Jackson < cloj...@clark-communications.com> wrote: > > select-keys currently returns a regular hash-map, regardless of the kind > of map provided as the input argument. > > Alternately, select-keys could call empty on it’s map argument to obtain > the map it will return, thereby preserving the type of map provided. > > FYI, Mark Engelberg recently pushed a change to data.priority-map that > ensures that the specific flavor of priority-map is preserved through calls > to empty… > > > -- > -- > 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.