On Tue, Sep 8, 2009 at 5:35 PM, Stephen C. Gilardi<squee...@mac.com> wrote: > > On Sep 8, 2009, at 2:14 AM, Timothy Pratley wrote: > >> According to the docstring compare returns -1, 0 or 1: >> user=> (compare \b \g) >> -5 > > We could fix the doc along the lines of: > > "Comparator. Returns a negative number, zero, or a positive number when x is > logically 'less than', 'equal to', or 'greater than' y. Same as Java > x.compareTo(y) except it also works for nil, and compares numbers and > collections in a type-independent manner. x must implement Comparable" > > or fix the implementation to conform to the current doc. > > My current thought is that we should fix the implementation and make a minor > mod to the doc to replace "Same as" with something like "Works like" because > compareTo only guarantees the sign of the return value. > > Other thoughts? >
We should fix the doc. Patch welcome for this. Thanks, Rich --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---