title: Passing a function as a parameter but getting unexpected results
body: <p>I'm using Racket with the "Advanced Student" language setting and I'm having difficulty trying to write a function that takes a function, executes it n times and reports the time elapsed for each run. This is what I've got so far.</p>
  
  <pre><code>(define (many n fn)
    (cond
      [(= n 0) true]
      [else (many (sub1 n) (local ((define k (time fn))) k))]))
  </code></pre>
  
  <p>I have a function called <code>fact</code> that computes the factorial of a number.</p>
  
  <pre><code>(define (fact n)
    (cond
      [(= 0 n) 1]
      [else (* n (fact (- n 1)))]))
  </code></pre>
  
  <p>If I evaluate <code>(time (fact 10000))</code>, I get reasonable results for cpu, real and gc time, as well as a large number. All well and good.</p>
  
  <p>However, when I try to evaluate <code>(many 3 (fact 10000))</code> I get:</p>
  
  <pre><code>cpu time: 0 real time: 0 gc time: 0
  cpu time: 0 real time: 0 gc time: 0
  cpu time: 0 real time: 0 gc time: 0
  true
  </code></pre>
  
  <p>Why is the function not evaluating <code>fact</code> despite being passed as a parameter?</p>