Mathematica > Core Language > Functional Programming > Functional Iteration >
Mathematica > Core Language > Procedural Programming > Looping Constructs > Functional Iteration >

Fold

Fold[f, x, list]
gives the last element of FoldList[f, x, list].
  • You can use Throw to exit from Fold before it is finished.
New in 2 | Last modified in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team