Skip to content

Nest

Nest[f, expr, n] returns f wrapped around expr n times.

Attributes[Nest] := {Protected}

Simple examples

In[1]:= Nest[f, x, 3]
Out[1]= f[f[f[x]]]
In[2]:= Nest[Function[Slot[1]^2], {1, 2, 3}, 3]
Out[2]= {1, 256, 6561}