In that case you should choose one of the other options so that you don't have to make changes to the call to DoaBunchOfStuff in multiple places - changing the parameter list for example. Repeating the "body" in that fashion also makes it less clear from the flow of the code that the two pieces of controlled work are in fact the same.
In particular, constructing the list to process up front makes it very clear where the processing differences are and what conditions those differences depend on (AnomalousMonk's solution for example).
In reply to Re^2: Loop once on condition 1, many times on cond. 2?
by GrandFather
in thread Loop once on condition 1, many times on cond. 2?
by punch_card_don
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |