diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/lists.texi | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi index f3758f5ce60..911defbc211 100644 --- a/doc/lispref/lists.texi +++ b/doc/lispref/lists.texi | |||
| @@ -705,9 +705,21 @@ same way. | |||
| 705 | Normally, when @var{tree} is anything other than a cons cell, | 705 | Normally, when @var{tree} is anything other than a cons cell, |
| 706 | @code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is | 706 | @code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is |
| 707 | non-@code{nil}, it copies vectors too (and operates recursively on | 707 | non-@code{nil}, it copies vectors too (and operates recursively on |
| 708 | their elements). | 708 | their elements). This function cannot cope with circular lists. |
| 709 | @end defun | 709 | @end defun |
| 710 | 710 | ||
| 711 | @defun safe-copy-tree tree &optional vecp | ||
| 712 | This function returns a copy of the tree @var{tree}. If @var{tree} is | ||
| 713 | a cons cell, this make a new cons cell with the same @sc{car} and | ||
| 714 | @sc{cdr}, then recursively copies the @sc{car} and @sc{cdr} in the | ||
| 715 | same way. | ||
| 716 | |||
| 717 | Normally, when @var{tree} is anything other than a cons cell, | ||
| 718 | @code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is | ||
| 719 | non-@code{nil}, it copies vectors and records too (and operates | ||
| 720 | recursively on their elements). This function handles circular lists | ||
| 721 | and vectors, and is thus slower than @code{copy-tree} for typical cases. | ||
| 722 | |||
| 711 | @defun flatten-tree tree | 723 | @defun flatten-tree tree |
| 712 | This function returns a ``flattened'' copy of @var{tree}, that is, | 724 | This function returns a ``flattened'' copy of @var{tree}, that is, |
| 713 | a list containing all the non-@code{nil} terminal nodes, or leaves, of | 725 | a list containing all the non-@code{nil} terminal nodes, or leaves, of |