Sorted maps sort only on keys, sorry. I was going to suggest using (sort-by frest foo) to at least get a sequence in the right order, but it seems like sorting might be broken at the moment? Looks like this response has turned into a bug report...
user=> (sort [3 1 2]) java.lang.ClassCastException: clojure.core$compare__2931 (NO_SOURCE_FILE:0) This is most likely because the comparator argument has been tagged as a Comparator, but the default 'compare' isn't a Comparator. user=> (sort (comp compare) [3 1 2]) (1 2 3) user=> (sort-by frest (comp compare) foo) java.lang.ClassCastException: clojure.core$sort_by__3528$fn__3531 (NO_SOURCE_FILE:0) The comparison function that sort-by builds isn't a Comparator either. Drat. On Dec 27, 1:20 am, Mibu <mibu.cloj...@gmail.com> wrote: > Is there a way to sort a sorted-map-by by value without a letrec? --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---