This function makes a copy of the top list level of the argument if the argument is a list, otherwise it simply returns the argument. This produces a new list which is equal to the previous list, and whose elements are eq. That is, the elements are not copied but simply reside in both the original and the copy.
Gamma> a = list(1, list(2,3,list(4),5)); (1 (2 3 (4) 5)) Gamma> b = copy(a); (1 (2 3 (4) 5)) Gamma> cadr(a); (2 3 (4) 5) Gamma> equal(cadr(a),cadr(b)); t Gamma> eq(cadr(a),cadr(b)); t Gamma>
Copyright © 1995-2006 by Cogent Real-Time Systems, Inc. All rights reserved.