From e602258e59d1b1b2f62349a5ac959aca9c3a1c06 Mon Sep 17 00:00:00 2001 From: Shingo Kitagawa Date: Wed, 15 Dec 2021 19:28:34 +0900 Subject: [PATCH] add warning in copy-tree manual --- doc/jlatex/jsequences.tex | 6 +++++- doc/latex/sequences.tex | 5 ++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/doc/jlatex/jsequences.tex b/doc/jlatex/jsequences.tex index 6780e5ffb..37c58123d 100644 --- a/doc/jlatex/jsequences.tex +++ b/doc/jlatex/jsequences.tex @@ -396,7 +396,11 @@ \subsection{リスト} 入れこリストである{\em tree}のコピーを返す。 しかし、環状参照はできない。環状リストは、 {\bf copy-object}でコピーできる。 -実際に、{\bf copy-tree}は{\tt (subst t t tree)}と簡単に記述される。} +実際に、{\bf copy-tree}は{\tt (subst t t tree)}と簡単に記述される。 +なお{\bf copy-tree}は{\em list}しかコピーできず、 +{\em integer-vector, float-vector}などは{\bf copy-seq}を使用しないとコピーできず、 +{\em interger-vector, float-vector}などを含む{\em list}は{\bf copy-object}を +使用しないとディープコピーできない。} \funcdesc{mapc}{func arg-list \&rest more-arg-lists}{ {\em arg-list}や{\em more-arg-lists}それぞれのN番目($N=0,1,\cdots$)の要素からなるリストに diff --git a/doc/latex/sequences.tex b/doc/latex/sequences.tex index ab94ba857..fbd75c0f0 100644 --- a/doc/latex/sequences.tex +++ b/doc/latex/sequences.tex @@ -393,7 +393,10 @@ \subsection{Lists} returns the copy of {\em tree} which may be a nested list but cannot have circular reference. Circular lists can be copied by {\bf copy-object}. -Actually, {\bf copy-tree} is simply coded as {\tt (subst t t tree)}.} +Actually, {\bf copy-tree} is simply coded as {\tt (subst t t tree)}. +Be careful that {\bf copy-tree} only return the copy of {\em list}. +and you need to use {\bf copy-seq} to copy {\em integer-vector, float-vector}, etc., +or {\bf copy-object} to deep-copy {\em list} with {\em integer-vector, float-vector} etc.} \funcdesc{mapc}{func arg-list \&rest more-arg-lists}{ applies {\em func} to a list of N-th elements in {\em arg-list} and each of