DOCUMENTATION CENTER SEARCH
Mathematica
>
Applying Functions to Lists
>
Built-in
Mathematica
Symbol
Applying Functions Repeatedly
Tutorials »
|
Fold
Accumulate
Differences
NestList
ComposeList
ExponentialMovingAverage
Partition
MapIndexed
See Also »
|
Applying Functions to Lists
Functional Iteration
Functional Programming
Language Overview
List Manipulation
More About »
FoldList
FoldList
[
f
,
x
, {
a
,
b
,
...
}]
gives
{
x
,
f
[
x
,
a
],
f
[
f
[
x
,
a
],
b
],
...
}
.
MORE INFORMATION
FoldList
[
Plus
, 0,
list
]
generates cumulative sums of the elements in
list
.
With a length
n
list,
FoldList
generates a list of length
.
»
The head of
list
in
FoldList
[
f
,
x
,
list
]
need not be
List
.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
In[1]:=
Out[1]=
Cumulative sums of the elements of the list:
In[1]:=
Out[1]=
Cumulative powers:
In[1]:=
Out[1]=
Generalizations & Extensions
(2)
Applications
(14)
Properties & Relations
(5)
Neat Examples
(1)
SEE ALSO
Fold
Accumulate
Differences
NestList
ComposeList
ExponentialMovingAverage
Partition
MapIndexed
TUTORIALS
Applying Functions Repeatedly
MORE ABOUT
Applying Functions to Lists
Functional Iteration
Functional Programming
Language Overview
List Manipulation
RELATED LINKS
NKS|Online
(
A New Kind of Science
)
New in 2
© 2008 Wolfram Research, Inc.