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 (juxt :visited :dist)) d))
The set tree is prefilled with d
user=> d
#user.RDistance{:node "foo", :dist 1, :visited 0}
I expect the set to remain the same when conj'oining d again, but repl
states
user=> (conj tree d)
#{#user.RDistance{:node "foo", :dist 1, :visited 0} #user.RDistance{:node
"foo", :dist 1, :visited 0}}
What is the problem?
Thanks
Christian
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.