MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Length and Drop

  • To: mathgroup at smc.vnet.net
  • Subject: [mg32193] Re: Length and Drop
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Sat, 5 Jan 2002 00:10:31 -0500 (EST)
  • References: <a13vdg$dgm$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Steve,

Drop[timeexp,1] evaluates by the
Drop[{{0,0},{7,8}},1 ]
{{7,8}}

It does nont redefine timeexp.


To get this you would have to evaluate

timeexp = Drop[timeexp,1]

--
Allan

---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565


"Steve Gray" <stevebg at adelphia.net> wrote in message
news:a13vdg$dgm$1 at smc.vnet.net...
>     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?
>
>




  • Prev by Date: Re: Length and Drop
  • Next by Date: Re: 1 equals 3 (among others)
  • Previous by thread: Re: Length and Drop
  • Next by thread: Re: Length and Drop