Suppose $f$ is a function from some set to itself. Is there a shortcut command in sage to compute an iterated composition of $f$, such as $f^3(x)=f(f(f(x)))$ where I could type something like f^3(x)
into the console, and more generally for computing $f^n(x)$ for a given $n$?