This is a recursive function. That is a confusing topic and can be very frustrating for learners. Rather than go through a long and complicated explanation, I would suggest using the search function in the upper right and search for “rangeOfNumbers” and you will find hundreds of discussions of this function, some of them with detailed explanations. If you’re still confused after that, check back.