How can I convert a for loop to a recursive function?

Published --