On Fri, Jan 9, 2009 at 8:28 AM, Chouser <chou...@gmail.com> wrote: > So maybe leaving 'sort' undefined for lists makes sense. If you want > them to sort like vectors, then use vectors!
But if the lists are nested within some aggregate structure, (e.g., in the original postr's use case, the lists were the second element of a vector), it becomes much harder to convert to a vector for sorting and then back at the end. It would be easier to just have compare defined for a list. And even though conj adds to different ends for a list and vector, they both have the same concept of "front" and "back", so the sort behavior should be the same. Of course, people need to be able to sort with their own comparators for other desired orderings, I'm just talking about what I perceive to be reasonable default behavior. Speaking of which, is there a way to, within Clojure, extend the existing list type to implement the comparable interface? I'm still trying to get my head around the whole Java interop thing. --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---