X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=man%2Flispref%2Ffunctions.texi;h=c2e6bb4287760841244a27f487abc7fa34d454a7;hb=8c04f8ba0df9e26d1aa76232db702296e932a8d4;hp=63b964abf3fba0534a53eaf8563d6bb509fb5085;hpb=afa9772e3fcbb4e80e3e4cfd1a40b4fccc6d08b8;p=chise%2Fxemacs-chise.git.1 diff --git a/man/lispref/functions.texi b/man/lispref/functions.texi index 63b964a..c2e6bb4 100644 --- a/man/lispref/functions.texi +++ b/man/lispref/functions.texi @@ -680,18 +680,21 @@ This function ignores any arguments and returns @code{nil}. @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 @@ -738,7 +741,8 @@ Between each pair of result strings, @code{mapconcat} inserts the string 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