Mercurial > hg > xemacs-beta
diff man/lispref/objects.texi @ 5359:f5a5501814f5
Document the CL set functions and #'eql in the Lispref, not just cl.texi
man/ChangeLog addition:
2011-02-19 Aidan Kehoe <kehoea@parhasard.net>
* lispref/lists.texi (Sets And Lists):
Document #'member*, #'remove*, #'delete* in this file. Document
#'memq, #'member, #'remq, #'remove, #'delq, #'delete in terms of
the former functions.
Document #'subsetp, #'union, #'intersection, #'set-difference,
#'set-exclusive-or and their destructive analogues in this file.
* lispref/lists.texi (Association Lists):
Document #'assoc*, #'rassoc* in this file. Document #'assq,
#'assoc, #'rassq, #'rassoc in terms of the first two functions.
* lispref/objects.texi (Equality Predicates):
Document #'eql here, don't leave it to cl.texi.
src/ChangeLog addition:
2011-02-19 Aidan Kehoe <kehoea@parhasard.net>
* fns.c (Fset_exclusive_or):
This function accepts the :stable keyword too, document this in
its arglist.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 19 Feb 2011 11:03:46 +0000 |
parents | 02d875ebd1ea |
children | d967d96ca043 |
line wrap: on
line diff
--- a/man/lispref/objects.texi Wed Feb 16 18:26:40 2011 +0000 +++ b/man/lispref/objects.texi Sat Feb 19 11:03:46 2011 +0000 @@ -2237,7 +2237,7 @@ @section Equality Predicates @cindex equality - Here we describe two functions that test for equality between any two + Here we describe functions that test for equality between any two objects. Other functions test equality between objects of specific types, e.g., strings. For these predicates, see the appropriate chapter describing the data type. @@ -2343,6 +2343,31 @@ @end example @end defun +@defun eql object1 object2 + +This function returns @code{t} if the two arguments are the same object, +as with @code{eq}. In addition, it returns @code{t} if @var{object1} +and @var{object2} are numeric objects of the same type and with equal +values. Otherwise it returns @code{nil}. @code{eql} is the default +test for hash tables, and for many sequence-oriented functions inherited +from Common Lisp. + +@example +@group +(eql 1 1) + @result{} t +(eql 1 1.0) ; different types + @result{} nil +(eq (+ 0.0 pi) pi) + @result{} nil ; in some contexts can be t, but don't rely on this! +(eql (+ 0.0 pi) pi) + @result{} t ; this is more reliable. +(position (+ 0 pi) (list 0 1 2 pi 4)) + @result{} 3 ; function's test defaults to eql +@end group +@end example +@end defun + @defun equal object1 object2 This function returns @code{t} if @var{object1} and @var{object2} have equal components, @code{nil} otherwise. Whereas @code{eq} tests if its