Add function that composes a function with itself n times