diff man/lispref/functions.texi @ 398:74fd4e045ea6 r21-2-29

Import from CVS: tag r21-2-29
author cvs
date Mon, 13 Aug 2007 11:13:30 +0200
parents 376386a54a3c
children 697ef44129c6
line wrap: on
line diff
--- a/man/lispref/functions.texi	Mon Aug 13 11:12:06 2007 +0200
+++ b/man/lispref/functions.texi	Mon Aug 13 11:13:30 2007 +0200
@@ -680,18 +680,21 @@
 @cindex mapping functions
 
   A @dfn{mapping function} applies a given function to each element of a
-list or other collection.  XEmacs Lisp has three such functions;
+list or other collection.  XEmacs Lisp has several such functions;
 @code{mapcar} and @code{mapconcat}, which scan a list, are described
-here.  For the third mapping function, @code{mapatoms}, see
-@ref{Creating Symbols}.
+here.   @xref{Creating Symbols}, for the function @code{mapatoms} which
+maps over the symbols in an obarray.
+
+Mapping functions should never modify the sequence being mapped over.
+The results are unpredictable.
 
 @defun mapcar function sequence
 @code{mapcar} applies @var{function} to each element of @var{sequence}
 in turn, and returns a list of the results.
 
-The argument @var{sequence} may be a list, a vector, or a string.  The
-result is always a list.  The length of the result is the same as the
-length of @var{sequence}.
+The argument @var{sequence} can be any kind of sequence; that is, a
+list, a vector, a bit vector, or a string.  The result is always a list.
+The length of the result is the same as the length of @var{sequence}.
 
 @smallexample
 @group
@@ -716,7 +719,7 @@
 Return the list of results."
   ;; @r{If no list is exhausted,}
   (if (not (memq 'nil args))              
-      ;; @r{apply function to @sc{CAR}s.}
+      ;; @r{apply function to @sc{car}s.}
       (cons (apply f (mapcar 'car args))  
             (apply 'mapcar* f             
                    ;; @r{Recurse for rest of elements.}
@@ -738,7 +741,8 @@
 other suitable punctuation.
 
 The argument @var{function} must be a function that can take one
-argument and return a string.
+argument and return a string.  The argument @var{sequence} can be any
+kind of sequence; that is, a list, a vector, a bit vector, or a string.
   
 @smallexample
 @group