Repeated composition of function
This functionality does not run in MATLAB.
fp::nest(f,n) returns the n-fold repeated composition of the function f.
Thus, given the function f, fp::nest returns the identity function id if n is 0 and otherwise the function
Note that fp::nest is obsolete, one should use the @@ operator or its functional form _fnest instead. It is only supported for compatibility with former versions of MuPAD®.
Apply the 3-fold repeated composition of f to x:
Numerically finding a fixed point of the function cos by repeated application:
p :=fp::nest(cos, 100)(1.0): p, cos(p)