How to make a copy of a list
- From: Trastabuga <lispercat@xxxxxxxxx>
- Date: Tue, 29 Apr 2008 12:30:18 -0700 (PDT)
when copy-list or copy-tree are not deep enough?
I have a big list and I need a function that returns one of its
branches depending on condition.
Later on, in another function I use that branch and modify it
(appending other lists to it).
Now, even though I return that branch using copy-tree, still when I
modify that branch, it modifies the original tree.
Is it because copy-tree only copies conses but not the atoms
themselves?
How can I do a deep copy of the list so it creates a completely new
instance of that branch?
Thank you,
Andrew
.
- Follow-Ups:
- Re: How to make a copy of a list
- From: Kaz Kylheku
- Re: How to make a copy of a list
- From: John Thingstad
- Re: How to make a copy of a list
- Prev by Date: Re: def app = apply, problem
- Next by Date: Re: Common Lisp: Forward reference to a symbol in an unloaded package, possible?
- Previous by thread: found .emacs, but doesnt work running lisp
- Next by thread: Re: How to make a copy of a list
- Index(es):
Relevant Pages
|