Okay let's take a real problem: You want to write a file listing function. This means you have to recursively run through all directories and subdirectories.
The first question you ask yourself is:...