title: how do I apply a function n times?
body: <p>I have been trying without much success to implement a higher order function that would take in 
  repeat(f, n) where f is another function and n is the integer value that says how many times n will be applied to a variable x. 
  For example:</p>
  
  <pre><code>def integer(x):
  
        x + 1
  </code></pre>
  
  <p>so i would have repeat (integer, 5) and I would have integer(integer(integer(integer(integer(x)</p>