Re: "Alternating" function

*To*: mathgroup at smc.vnet.net*Subject*: [mg63283] Re: [mg63260] "Alternating" function*From*: Renan <renan.birck at gmail.com>*Date*: Thu, 22 Dec 2005 00:04:47 -0500 (EST)*References*: <200512210435.XAA14743@smc.vnet.net> <640A546D-21CE-4DFF-BDD0-9414A8EF775F@jeol.com>*Sender*: owner-wri-mathgroup at wolfram.com

On 12/21/05, Sseziwa Mukasa <mukasa at jeol.com> wrote: > One way is to use Fold instead of Nest > > Fold[x+#2 f[#1]&,x,Table[(-1)^i,{i,0,n-1}] This does it neatly, and the other solutions also work. Thanks to Wouter, Dave, Sseziwa, Ingolf and Bob, and all others that I forgot to mention the name! :)

**References**:**"Alternating" function***From:*Renan <renan.birck@gmail.com>