I agree with you fully; but, sometimes OP needs an example which may prompt him to ask inquisitive questions. I have reason to believe that OP has no idea about recursion (a difficult concept to digest how a program does call itself!); let's see if he asks question what is a recursion.
I have avoided nested codes for the convenience of reading.