FoldList
Usage
• FoldList[f, x, a, b, ... ] 给出 x, f[x, a], f[f[x, a], b], ...  .
Notes
• FoldList[Plus, 0, list] 产生在list中的元素的累积和。 • 在一个长度为  的列表中, FoldList产生一个长度为  的列表。 • FoldList[f, x, list]中list的头不必是List。
Further Examples
This gives a list of cumulative sums.
In[1]:=
|
Out[1]=
|
For the cumulative products you have to start with .
In[2]:=
|
Out[2]=
|
|