Hi Steve,
I didn't know the difference between a keyfn and a comparator.
Thanks for pointing that out!
Kev
On Jun 22, 3:50 pm, "Stephen C. Gilardi" wrote:
> On Jun 22, 2009, at 1:23 AM, kkw wrote:
>
> > I had some fortune with the sorted-by function:
>
> > 1:11 user=> (sort-by (fn [e] (
On Jun 22, 2009, at 1:23 AM, kkw wrote:
I had some fortune with the sorted-by function:
1:11 user=> (sort-by (fn [e] (second e)) [[1 99] [3 4] [5 6] [7 8]])
([3 4] [5 6] [7 8] [1 99])
You were using the form of sort-by that accepts a "keyfn", not the one
where you also provide a compara
Hi folks,
I had some fortune with the sorted-by function:
1:11 user=> (sort-by (fn [e] (second e)) [[1 99] [3 4] [5 6] [7 8]])
([3 4] [5 6] [7 8] [1 99])
so I thought I'd have a go with sorted-map-by also:
1:13 user=> (doc sorted-map-by)
-
clojure.core/sorted-ma