Is there a library function available in Haskell to compose a function with itself n times?
For example I have this function:
func :: a ->
A variation on trinithis' answer using the newtype package, just for fun:
(\n f -> under Endo (mconcat . replicate n) f)
Or point-free:
under Endo . (mconcat .) . replicate