> Equality and ordinality are not the same thing. It should be > perfectly reasonable to hand someone a set of unique objects sorted by > some non-unique attribute of the elements of the set.
Sure, it's perfectly reasonable but it implies a different data structure. It sounds like you want a data structure that is both a set with respect to its default notion of equality (and hashing) and a sorted sequence with respect to some custom ordering. That implies two data structures, not one. If your tree is constructed based on the custom ordering, then you cannot use the same tree for fast lookups based on the default notion of equality. You can only do slow linear-time lookups by traversing the tree's nodes exhaustively. -Per -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en