fl'>1L</span>)
<span class='no'>fn</span> <span class='kw'>=</span> <span class='fu'>addCountingWrapper</span>(<span class='no'>fn</span>)

<span class='co'># we get a value of 0 since the function has not been called yet</span>
<span class='fu'>print</span>(<span class='fu'><a href='getNumberOfEvaluations.html'>getNumberOfEvaluations</a></span>(<span class='no'>fn</span>))</div><div class='output co'>#&gt; [1] 0</div><div class='input'>
<span class='co'># now call the function 10 times consecutively</span>