Compose Functions



> Is there some function in Maxima, to work compose functions?. I refer to
> compose functions with:
> 
> f(1)=f(x)
> f(2)=f(f(x))
> f(3)=f(f(f(x)))

No built-in function, but easy enough to define:

   composen(f,n,x):=if n=0 then x else f(composen(f,n-1,x))$

   composen(sin,3,y) => sin(sin(sin(y)))