aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2006-10-10 16:11:57 +0000
committerKim F. Storm2006-10-10 16:11:57 +0000
commit1334cc0ca99a46c5fc51ce880aadbd6daf82e5d7 (patch)
tree262a74049de83632c1d10857c64110bad05cbf5d
parent3075e881465441a8a740c80489f6552903cf9e96 (diff)
downloademacs-1334cc0ca99a46c5fc51ce880aadbd6daf82e5d7.tar.gz
emacs-1334cc0ca99a46c5fc51ce880aadbd6daf82e5d7.zip
(Sets And Lists): Add memql.
-rw-r--r--lispref/lists.texi21
1 files changed, 21 insertions, 0 deletions
diff --git a/lispref/lists.texi b/lispref/lists.texi
index 1c6247d818c..17ed62a6d6c 100644
--- a/lispref/lists.texi
+++ b/lispref/lists.texi
@@ -1395,6 +1395,27 @@ The function @code{delq} offers a way to perform this operation
1395destructively. See @ref{Sets And Lists}. 1395destructively. See @ref{Sets And Lists}.
1396@end defun 1396@end defun
1397 1397
1398@defun memql object list
1399The function @code{member} tests to see whether @var{object} is a member
1400of @var{list}, comparing members with @var{object} using @code{eql},
1401so floating point elements are compared by value.
1402If @var{object} is a member, @code{memql} returns a list starting with
1403its first occurrence in @var{list}. Otherwise, it returns @code{nil}.
1404
1405Compare this with @code{memq}:
1406
1407@example
1408@group
1409(memql 1.2 '(1.1 1.2 1.3) ; @r{@code{1.2} and @code{1.2} are @code{eql}.}
1410 @result{} (1.2 1.3)
1411@end group
1412@group
1413(memq 1.2 '(1.1 1.2 1.3) ; @r{@code{1.2} and @code{1.2} are not @code{eq}.}
1414 @result{} nil
1415@end group
1416@end example
1417@end defun
1418
1398The following three functions are like @code{memq}, @code{delq} and 1419The following three functions are like @code{memq}, @code{delq} and
1399@code{remq}, but use @code{equal} rather than @code{eq} to compare 1420@code{remq}, but use @code{equal} rather than @code{eq} to compare
1400elements. @xref{Equality Predicates}. 1421elements. @xref{Equality Predicates}.