Menu

#6 Shallow copy

open
Core (1)
5
2006-09-26
2006-09-26
No

There should be a shallow copy option to the copy
command, or a separate command. As Alexandre Ferrieux
writes:

> While if one writes
>
> set m [copy -shallow $l]
>
> then only the toplevel is duplicated. This is useful
for example when
> sorting lists of vectors: you're interested in the
permutation of
> references to the vectors (sublists), but you don't
want to spend the
> time of duplicating them.

Discussion


Log in to post a comment.