# HG changeset patch # User Richard M. Stallman # Date 1063328617 0 # Node ID c2a16cb1821e6e4b01ec8c490bf4c07cb34e12b9 # Parent 3bbb565fa7ac341d08117acfb8064c229e7a9be2 (Building Lists): Add copy-tree. diff -r 3bbb565fa7ac -r c2a16cb1821e lispref/lists.texi --- a/lispref/lists.texi Fri Sep 12 00:59:55 2003 +0000 +++ b/lispref/lists.texi Fri Sep 12 01:03:37 2003 +0000 @@ -733,6 +733,18 @@ destructively. See @ref{Sets And Lists}. @end defun +@defun copy-tree tree &optional vecp +This function returns a copy the tree @code{tree}. If @var{tree} is a +cons cell, this makes a new cons cell with the same @sc{car} and +@sc{cdr}, then recursively copies the @sc{car} and @sc{cdr} in the +same way. + +Normally, when @var{tree} is anything other than a cons cell, +@code{copy-tree} simply returns @var{tree}. However, if @var{vecp} is +non-@code{nil}, it copies vectors too (and operates recursively on +their elements). +@end defun + @defun number-sequence from to &optional separation This returns a list of numbers starting with @var{from} and incrementing by @var{separation} (or by 1 if @var{separation}