COPYLIST(L) question



I agree that newsimp should not make any mutable
structure unique, so that [a,b]  or matrix([a,b],[c,d])  should
not be unique-ified.

This is not currently a feature of newsimp. (A bug.)


Stavros Macrakis wrote:

>>do L:?copy(M).
>>
>>The lisp program COPY copies sublists. This is a problem only 
>>if the (sub) structures you are copying are not lisp lists. All
>>the usual macsyma structures are lists.   (Newsimp uses hashtables,
>>which would make this, as well as Stavros' fix).
>>    
>>
>
>I generally prefer to stay within Maxima, because once you introduce
>things like ?copy, users immediately think they can use ?cdr etc.
>
>?copy just calls CL copy-tree, so does in fact work on dotted pairs as
>found in CRE.  I guess it won't work for objects which aren't list
>structure, but Maxima doesn't use any of those.
>
>About the hashtable implementation, if newsimp makes [a,b] unique, then
>that's a bug since lists are mutable by design.  If it doesn't, then I'd
>think that both my code and ?copy would work fine.
>
>      -s
>
>  
>