Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2007

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

Search the Archive

"Accumulate" in Mathematica 6

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82776] "Accumulate" in Mathematica 6
  • From: "Oskar Itzinger" <oskar at opec.org>
  • Date: Tue, 30 Oct 2007 05:49:50 -0500 (EST)

Very sadly, Mathematica 6 is not supported under Irix - so I can't play with
it practically - but I noticed in the online

documentation that there is a new function "Accumulate[list]", defined to be
equivalent to "Rest[FoldList[Plus, 0, list]]",

giving a list of the successive accumulated totals of the elements in
<list>.

Funny. While it was considered obsolete and superseded by "FoldList" in
Mathematica 2, Mathematica 1 (!) already did

have a function "Accumulate", defined as

Accumulate[f, g[e1, e2, e3, ...]] <==> g[e1, f[e1, e2], f[f[e1, e2], e3],
...]

so that

Accumulate[Plus, Range[5]] <==> {1, 3, 6, 10, 15}

However, "Accumulate" in Mathematica 1 clearly was not restricted to "Plus"
but rather specifically intended for dealing

with functions that take exactly two arguments - so, I believe that
"Accumulate" in Mathematica 6 is much less usable

than the former in Mathematica 1.

Maybe I'm missing something here - but what was the rationale behind
re-implementing "Accumulate" in such a restricted

version now?

Thanks.

/oskar





  • Prev by Date: Re: Vectors,Norms and assumptions
  • Next by Date: Re: Bug of Integrate
  • Previous by thread: Re: : Polar Plot
  • Next by thread: Re: "Accumulate" in Mathematica 6