Repetition Through Recursion
There are times when a sequence of actions should be repeated. We may want to apply a function to all the elements of a list. We may want to add the first twenty numbers in a list. We may want to return the first symbol in a list. To carry out such actions the technique of recursion can be used. It is essential to master recursion, as it is commonly used in Scheme programming. There are different types of recursion that we will explore individually. The important thing is not to just memorize the general form for each type of recursion illustrated, but to get a thorough understanding of the process of writing recursive functions. Recursion is a skill that you improve on with practice. Use the examples to guide you, then practice, practice, practice.
KeywordsOuter Loop Recursive Function Pseudo Code Nest Loop Recursive Call
Unable to display preview. Download preview PDF.