Another way that we could have transformed the while statement would be to turn it into a function which calls itself, and continues to call itself as long as the condition is true, with two restrictions. 