Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: Re: newbie question on functions

  • To: mathgroup at
  • Subject: [mg51822] Re: [mg51794] Re: newbie question on functions
  • From: Bob Hanlon <hanlonr at>
  • Date: Wed, 3 Nov 2004 01:23:45 -0500 (EST)
  • Reply-to: hanlonr at
  • Sender: owner-wri-mathgroup at

AppendTo and PrependTo do change their original lists

alpha = {a,b,c};

AppendTo[alpha, d];


{a, b, c, d}

PrependTo[alpha, a];


{a, a, b, c, d}

Bob Hanlon

> From: AES/newspost <siegman at>
To: mathgroup at
> Date: 2004/11/02 Tue AM 02:05:23 EST
> To: mathgroup at
> Subject: [mg51822] [mg51794] Re: newbie question on  functions
> In article <cm4r7j$6lm$1 at>,
>  David Bailey <dave at> wrote:
> > Yes, of course you can save the result of a calculation. For example:
> > 
> > result=intensity[4.,5.]
> For the original "newbie" poster:
> For newbies, or less expert users like me, it's easy to think that 
> something like
>     AppendTo[list, expr]
> is a "command" that will do what it says: append expr to list.  Takes a 
> few bad experiences to realize that you actually have to say
>     list = AppendTo[list,expr]
> Same general principle applies more broadly.

Bob Hanlon
Chantilly, VA

  • Prev by Date: Re: Graphics and Random[] questions
  • Next by Date: Re: 3D plotting problem
  • Previous by thread: Re: Re: newbie question on functions
  • Next by thread: Re: Mathematica's (and others) ancient widget toolkit ... why?