summaryrefslogtreecommitdiff
path: root/lispref/lists.texi
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1995-06-05 12:23:13 +0000
committerKarl Heuer <kwzh@gnu.org>1995-06-05 12:23:13 +0000
commit7090135ad270c767d3e15413175810c20148ac4a (patch)
tree68b7ecde183e08f4d00f5c3a980caa46d3e2f0c9 /lispref/lists.texi
parentb62c7261765c63564dbb2093d8db85ba481b14f1 (diff)
downloademacs-7090135ad270c767d3e15413175810c20148ac4a.tar.gz
*** empty log message ***
Diffstat (limited to 'lispref/lists.texi')
-rw-r--r--lispref/lists.texi46
1 files changed, 18 insertions, 28 deletions
diff --git a/lispref/lists.texi b/lispref/lists.texi
index dcb3b8af9d5..55ce93c9547 100644
--- a/lispref/lists.texi
+++ b/lispref/lists.texi
@@ -554,34 +554,14 @@ not a list, the sequence's elements do not become elements of the
resulting list. Instead, the sequence becomes the final @sc{cdr}, like
any other non-list final argument.
-Integers are also allowed as arguments to @code{append}. They are
-converted to strings of digits making up the decimal print
-representation of the integer, and these strings are then appended.
-Here's what happens:
-
-@example
-@group
-(setq trees '(pine oak))
- @result{} (pine oak)
-@end group
-@group
-(char-to-string 54)
- @result{} "6"
-@end group
-@group
-(setq longer-list (append trees 6 '(spruce)))
- @result{} (pine oak 54 spruce)
-@end group
-@group
-(setq x-list (append trees 6 6))
- @result{} (pine oak 54 . 6)
-@end group
-@end example
-
-This special case exists for compatibility with Mocklisp, and we don't
-recommend you take advantage of it. If you want to convert an integer
-in this way, use @code{format} (@pxref{Formatting Strings}) or
-@code{number-to-string} (@pxref{String Conversion}).
+The @code{append} function also allows integers as arguments. It
+converts them to strings of digits, making up the decimal print
+representation of the integer, and then uses the strings instead of the
+original integers. @strong{Don't use this feature; we plan to eliminate
+it. If you already use this feature, change your programs now!} The
+proper way to convert an integer to a decimal number in this way is with
+@code{format} (@pxref{Formatting Strings}) or @code{number-to-string}
+(@pxref{String Conversion}).
@end defun
@defun reverse list
@@ -1303,6 +1283,16 @@ Here is another example, in which the keys and values are not symbols:
@end smallexample
@end defun
+@defun rassoc value alist
+This function returns the first association with value @var{value} in
+@var{alist}. It returns @code{nil} if no association in @var{alist} has
+a @sc{cdr} @code{equal} to @var{value}.
+
+@code{rassoc} is like @code{assoc} except that it compares the @sc{cdr} of
+each @var{alist} association instead of the @sc{car}. You can think of
+this as ``reverse @code{assoc}'', finding the key for a given value.
+@end defun
+
@defun assq key alist
This function is like @code{assoc} in that it returns the first
association for @var{key} in @var{alist}, but it makes the comparison