# Command: Fold

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    Fold - result of repeatedly applying a function with two arguments

Synopsis:

    x [a b c ...] f Select -> f( ...n times... f(f(f(x,a),b),c) ...)

Examples:

    1 [2 x] Range {mul} Fold
      computes faculty of integer x

Author:

    Diesmann

FirstVersion:

    9.2.01
      Remarks:Fold is a restricted variant of forall.
      It is implemented to demonstrate the use of forall as a
      functional operator and for compatibility with Mathematica.

SeeAlso:

- forall
- repeat
- FoldList
- Nest

Source:

    /opt/conda/conda-bld/nest_1512418773968/work/nest-2.14.0/lib/sli/mathematica.sli

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative