Consider addition of a foreach_with_index() macro.
Open
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
Sometimes, we have to add a boolean flag variable to answer the question "am I on the first iteration".
If we have several of these occurrences or if we have instances where we declare our own index variables while walking through the loop and increment them on each iteration, then we should consider implementing a foreach_with_index() macro and look at it.
Contributor guide
Assessment
This issue has not been assessed yet.