Re: Length and Drop
- To: mathgroup at smc.vnet.net
- Subject: [mg32191] Re: [mg32183] Length and Drop
- From: BobHanlon at aol.com
- Date: Sat, 5 Jan 2002 00:10:28 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 1/4/02 5:31:06 AM, stevebg at adelphia.net writes:
>The following sequence seems wrong to me, in that
>after dropping some elements from a list, its Length is
>still the same. I copied this directly from the notebook
>but removed the In[] and Out[] statements.
>
>
>timexp={{0,0}} -> {{0,0}} [this is ok]
>
>timexp=Append[timexp,{7,8}] -> {{0,0},{7,8}} [this is ok]
>
>Length[timexp] -> 2 [this is ok]
>
>Drop[timexp,1] -> {{7,8}} [this is ok]
>
>Length[timexp] -> 2 [ this is what I did not expect!]
>
> Should not Drop reduce the Length of the list by the amount
>dropped?
No. With your second statement you re-defined timexp, with your fourth
statement you did not.
Bob Hanlon
Chantilly, VA USA