nce. See what happens if you use <code>1:5</code> instead.</p>
<p>Equivalently, we could have defined the function first and then used the function in <code>lapply()</code>.</p>
<div class="sourceCode" id="cb409"><pre class="sourceCode r"><code class="sourceCode r"><span id="cb409-1"><a href="loops.html#cb409-1" tabindex="-1"></a>add_fun <span class="ot">&lt;-</span> <span class="cf">function</span>(a) {a <span class="sc">+</span> <span class="dv">1</span>}</span>
<span id="cb409-2"><a href="loops.html#cb40