Hi,
you are using comparator incorrectly. The function you pass there should
return true, when x is to the left of y when called as (f x y). See the
following example.
user=> (defrecord Foo [a b])
user.Foo
; Wrong usage: your example (The new element is always smaller!)
user=> (-> (sorted-set-b
Hi all,
please consider the following record definition
(defrecord RDistance
[node dist visited])
as well as an instance and a tree set with a custom comparator ordering
content first by :visited and after that by :dist
(def d (RDistance. "foo" 1 0))
(def tree (sorted-set-by (comparator (jux