Adding an element to a list
- To: mathgroup at yoda.physics.unc.edu
- Subject: Adding an element to a list
- From: JWENDEL at isdmnl.wr.usgs.gov
- Date: Fri, 29 Jan 1993 11:12:48 -0800 (PST)
This is to answer the query from neilb, who found that an attempt to add 1 to the last element of the list {x,y,z,0,0} produced {x,y,z,1,1}, mysteriously. I tried it with tracing turned On[] and found that the replacement command is being interpreted as applied to the zeros in the list, because l at position Length[l] is 0, so 1 is added to all the 0's.