Is there a library function available in Haskell to compose a function with itself n times?
For example I have this function:
func :: a ->
The iterate solution is fine, or you might like this one: the composition of n copies of f is foldr (.) id (replicate n f).
iterate
n
f
foldr (.) id (replicate n f)