Well... It would take the integer and the condition and would somehow have to link to the operations that get repeated.
And do...while is different to while...do, you might want to implement both.
Apologies for coming at this as a programmer used to working with single values - I think the tools is meant more as mathematical operations on sets. I have never really learned that.