Re: copying arrays
- From: Ken Tilton <ken@xxxxxxxxxxxxxxxxxx>
- Date: Sat, 28 Apr 2007 23:58:57 -0400
Q wrote:
Hi all,
Simple question:
CL-USER 37 > (setf a (make-array 5 :initial-element 7))
#(7 7 7 7 7)
CL-USER 38 > (setf b a)
#(7 7 7 7 7)
CL-USER 39 > (eq a b)
T
CL-USER 40 > (setf (aref a 0) 9)
9
CL-USER 41 > a
#(9 7 7 7 7)
CL-USER 42 > b
#(9 7 7 7 7)
How do I pass copies of the array around, instead of the array
itself? I don't want them to be eq. But, it'd be nice if they were
equal :)
copy-seq?
kt
--
http://www.theoryyalgebra.com/
"Algebra is the metaphysics of arithmetic." - John Ray
"As long as algebra is taught in school,
there will be prayer in school." - Cokie Roberts
"Stand firm in your refusal to remain conscious during algebra."
- Fran Lebowitz
"I'm an algebra liar. I figure two good lies make a positive."
- Tim Allen
.
- References:
- copying arrays
- From: Q
- copying arrays
- Prev by Date: Re: pattern-matching in LISP?
- Next by Date: Re: copying arrays
- Previous by thread: copying arrays
- Next by thread: Re: copying arrays
- Index(es):