The doc of "sort" states that you need to implement java.util.Comparator in order to use custom sorting. Why then does this not cause any error?
user=> (defn my-comp [x y] (cond (< x y) 1 (= x y) 0 :else -1)) #=(var user/my-comp) user=> (sort [5 3 1 2]) (1 2 3 5) user=> (sort my-comp [5 3 1 2]) (5 3 2 1) --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---