Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
5358:31475de17064 | 5359:f5a5501814f5 |
---|---|
2235 | 2235 |
2236 @node Equality Predicates | 2236 @node Equality Predicates |
2237 @section Equality Predicates | 2237 @section Equality Predicates |
2238 @cindex equality | 2238 @cindex equality |
2239 | 2239 |
2240 Here we describe two functions that test for equality between any two | 2240 Here we describe functions that test for equality between any two |
2241 objects. Other functions test equality between objects of specific | 2241 objects. Other functions test equality between objects of specific |
2242 types, e.g., strings. For these predicates, see the appropriate chapter | 2242 types, e.g., strings. For these predicates, see the appropriate chapter |
2243 describing the data type. | 2243 describing the data type. |
2244 | 2244 |
2245 @defun eq object1 object2 | 2245 @defun eq object1 object2 |
2341 @result{} nil ; @r{We are still healthy.} | 2341 @result{} nil ; @r{We are still healthy.} |
2342 @end group | 2342 @end group |
2343 @end example | 2343 @end example |
2344 @end defun | 2344 @end defun |
2345 | 2345 |
2346 @defun eql object1 object2 | |
2347 | |
2348 This function returns @code{t} if the two arguments are the same object, | |
2349 as with @code{eq}. In addition, it returns @code{t} if @var{object1} | |
2350 and @var{object2} are numeric objects of the same type and with equal | |
2351 values. Otherwise it returns @code{nil}. @code{eql} is the default | |
2352 test for hash tables, and for many sequence-oriented functions inherited | |
2353 from Common Lisp. | |
2354 | |
2355 @example | |
2356 @group | |
2357 (eql 1 1) | |
2358 @result{} t | |
2359 (eql 1 1.0) ; different types | |
2360 @result{} nil | |
2361 (eq (+ 0.0 pi) pi) | |
2362 @result{} nil ; in some contexts can be t, but don't rely on this! | |
2363 (eql (+ 0.0 pi) pi) | |
2364 @result{} t ; this is more reliable. | |
2365 (position (+ 0 pi) (list 0 1 2 pi 4)) | |
2366 @result{} 3 ; function's test defaults to eql | |
2367 @end group | |
2368 @end example | |
2369 @end defun | |
2370 | |
2346 @defun equal object1 object2 | 2371 @defun equal object1 object2 |
2347 This function returns @code{t} if @var{object1} and @var{object2} have | 2372 This function returns @code{t} if @var{object1} and @var{object2} have |
2348 equal components, @code{nil} otherwise. Whereas @code{eq} tests if its | 2373 equal components, @code{nil} otherwise. Whereas @code{eq} tests if its |
2349 arguments are the same object, @code{equal} looks inside nonidentical | 2374 arguments are the same object, @code{equal} looks inside nonidentical |
2350 arguments to see if their elements are the same. So, if two objects are | 2375 arguments to see if their elements are the same. So, if two objects are |