diff options
Diffstat (limited to 'doc/ref')
-rw-r--r-- | doc/ref/api-data.texi | 3 | ||||
-rw-r--r-- | doc/ref/api-utility.texi | 15 |
2 files changed, 11 insertions, 7 deletions
diff --git a/doc/ref/api-data.texi b/doc/ref/api-data.texi index ed14b2298..2ad13f5a5 100644 --- a/doc/ref/api-data.texi +++ b/doc/ref/api-data.texi @@ -5924,7 +5924,8 @@ that modifying the elements of the new list also modifies the elements of the old list. On the other hand, applying procedures like @code{set-cdr!} or @code{delv!} to the new list will not alter the old list. If you also need to copy the list elements (making a deep copy), -use the procedure @code{copy-tree} (@pxref{Copying}). +use the procedure @code{copy-tree} from @code{(ice-9 copy-tree)} +(@pxref{Copying}). @node List Selection @subsubsection List Selection diff --git a/doc/ref/api-utility.texi b/doc/ref/api-utility.texi index d82d31a48..5c0142940 100644 --- a/doc/ref/api-utility.texi +++ b/doc/ref/api-utility.texi @@ -1,6 +1,6 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. -@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2011, 2012, 2013, 2014 +@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2011, 2012, 2013, 2014, 2020 @c Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @@ -378,13 +378,16 @@ is not specified. @node Copying @subsection Copying Deep Structures -@c FIXME::martin: Review me! - The procedures for copying lists (@pxref{Lists}) only produce a flat copy of the input list, and currently Guile does not even contain -procedures for copying vectors. @code{copy-tree} can be used for these -application, as it does not only copy the spine of a list, but also -copies any pairs in the cars of the input lists. +procedures for copying vectors. The @code{(ice-9 copy-tree)} module +contains a @code{copy-tree} function that can be used for this purpose, +as it does not only copy the spine of a list, but also copies any pairs +in the cars of the input lists. + +@example +(use-modules (ice-9 copy-tree)) +@end example @deffn {Scheme Procedure} copy-tree obj @deffnx {C Function} scm_copy_tree (obj) |