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.