Re: sorted-map-by sample call

2009-06-21 Thread kkw
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] (

Re: sorted-map-by sample call

2009-06-21 Thread Stephen C. Gilardi
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

sorted-map-by sample call

2009-06-21 Thread kkw
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