A utility in the Teradata Vantage tooling ecosystem must repeatedly process a counter. Implement a function that produces the values visited by a do-while loop, but the implementation itself must use a for loop.
The loop body must execute at least once, even when start is already beyond limit. After each value is recorded, update the counter by step, then continue only while the updated counter remains within the limit.
Implement do_while_sequence(start, step, limit).
start, step, and limit.step, continue while the updated counter is less than or equal to limit.step, continue while the updated counter is greater than or equal to limit.for loop and must not use a while loop.def do_while_sequence(start, step, limit):