# Skipping parts of a for loop in the first iteration

**URL:** https://discourse.julialang.org/t/skipping-parts-of-a-for-loop-in-the-first-iteration/16252
**Category:** General Usage
**Created:** [October 12, 2018, 7:54pm UTC](https://discourse.julialang.org/t/skipping-parts-of-a-for-loop-in-the-first-iteration/16252 "2018-10-12T19:54:53Z")
**Posts on this page:** 1
**Page:** 2

<div class="post-metadata">

### Author: ![mschauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mschauer/32/13946_2.png) [@mschauer](https://discourse.julialang.org/u/mschauer)
#### Post date: [October 29, 2022, 7:25am UTC](https://discourse.julialang.org/t/skipping-parts-of-a-for-loop-in-the-first-iteration/16252/22 "2022-10-29T07:25:51Z")

</div>

My interest is mostly in accumulation where there is no sensible typestable default and classically you would need to split off the first iteration, duplicate the entire loop body, and make a tiny change to it (eg += becomes =) and continue with a loop over the rest of the iterator

I really don’t like that

[Previous page](https://discourse.julialang.org/t/skipping-parts-of-a-for-loop-in-the-first-iteration/16252.md?page=1)
