Re: space effecient representations of list subsets (addendum)

Jaap Vermeulen (jaap@sequent.com)
Fri, 03 Dec 93 12:33:00 PST

| That is, am I misunderstanding when things are a value and when they
| are a reference, and is the obvious [ list[1], list[22], ... ] actually
| the right thing to do ?

list[1] is a reference to the object located at index 1.
If you're not sure, always draw boxes and arrows and you'll figure it out.
At any rate, the obvious will indeed create a new list containing references
to the same objects as the original list is pointing to.

The mistake in your reasoning is that list[:] creates a copy of the list,
not a copy of the objects in the list.

Good luck,

-Jaap-