bet365 Interview Question

Convert an OO function involving a for loop into a recursive function