emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Doc string for `sort'


From: Kim F. Storm
Subject: Doc string for `sort'
Date: Thu, 16 Jun 2005 16:21:36 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

The doc string for `sort' has the following requirement:

Returns the sorted list.  LIST is modified by side effects.
PREDICATE is called with two elements of LIST, and should return t
if the first element is "less" than the second.  */)

The lisp ref, says the same thing:

     The argument PREDICATE must be a function that accepts two
     arguments.  It is called with two elements of LIST.  To get an
     increasing order sort, the PREDICATE should return `t' if the
     first element is "less than" the second, or `nil' if not.


Looking at the code, PREDICATE just need to return non-nil;
so is there a reason why the doc string says the return 
value should be `t' rather than any non-`nil' value?

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]