Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica > Applying Functions to Lists >

FoldList

FoldList[f, x, {a, b, ...}]
gives {x, f[x, a], f[f[x, a], b], ...}.
  • FoldList[Plus, 0, list] generates cumulative sums of the elements in list.
  • With a length n list, FoldList generates a list of length n+1.  »
New in 2
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team