# Command: NestList

NEST HelpDesk | Command Index | NEST Quick Reference

Name:

    NestList - gives a list of the results of applying f to x 0 through n times.

Synopsis:

    x f n NestList ->  [x, x f,  x f f,..., x f1 ... fn]

Description:

    NestList repeatedly applies f to the supplied argument and returns
      the result als well as all intermediate results in a list.
      Note that f must expect and return exactly one argument.
      Examples:   1 {2 mul} 3 NestList -> [1 2 4 8]

Parameters:

    x	- any object to which f can be applied
      f	- an executable object.

SeeAlso:

- Map
- forall

Source:

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

NEST HelpDesk | Command Index | NEST Quick Reference

© 2004 The NEST Initiative