ass="dv">4</span>, <span class="cf">function</span>(a) {a <span class="sc">+</span> <span class="dv">1</span>})</span>
<span id="cb410-2"><a href="loops.html#cb410-2" tabindex="-1"></a><span class="do">## [1] 1 2 3 4 5</span></span></code></pre></div>
<p>As you can see, in both cases, we get exactly the same results as when we used the for loop.</p>
</div>
</div>
</div>
            </section>

          </div>
        </div>
      </div>
<a href="combining-logical-operators.html" class="navigation navigatio