Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1334cc0c
Commit
1334cc0c
authored
Oct 10, 2006
by
Kim F. Storm
Browse files
(Sets And Lists): Add memql.
parent
3075e881
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
lispref/lists.texi
lispref/lists.texi
+21
-0
No files found.
lispref/lists.texi
View file @
1334cc0c
...
@@ -1395,6 +1395,27 @@ The function @code{delq} offers a way to perform this operation
...
@@ -1395,6 +1395,27 @@ The function @code{delq} offers a way to perform this operation
destructively. See @ref{Sets And Lists}.
destructively. See @ref{Sets And Lists}.
@end defun
@end defun
@defun memql object list
The function @code{member} tests to see whether @var{object} is a member
of @var{list}, comparing members with @var{object} using @code{eql},
so floating point elements are compared by value.
If @var{object} is a member, @code{memql} returns a list starting with
its first occurrence in @var{list}. Otherwise, it returns @code{nil}.
Compare this with @code{memq}:
@example
@group
(memql 1.2 '(1.1 1.2 1.3) ; @r{@code{1.2} and @code{1.2} are @code{eql}.}
@result{} (1.2 1.3)
@end group
@group
(memq 1.2 '(1.1 1.2 1.3) ; @r{@code{1.2} and @code{1.2} are not @code{eq}.}
@result{} nil
@end group
@end example
@end defun
The following three functions are like @code{memq}, @code{delq} and
The following three functions are like @code{memq}, @code{delq} and
@code{remq}, but use @code{equal} rather than @code{eq} to compare
@code{remq}, but use @code{equal} rather than @code{eq} to compare
elements. @xref{Equality Predicates}.
elements. @xref{Equality Predicates}.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment