Skip to content

NestList

Like Nest, but returns a list of intermediate results.

$ wo 'NestList[f, x, 3]'
{x, f[x], f[f[x]], f[f[f[x]]]}