Skipping parts of a for loop in the first iteration

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

2 Likes