Next: Looping exercise, Previous: dolist dotimes, Up: Loops & Recursion [Contents][Index]
A recursive function contains code that tells the Lisp interpreter to call a program that runs exactly like itself, but with slightly different arguments. The code runs exactly the same because it has the same name. However, even though the program has the same name, it is not the same entity. It is different. In the jargon, it is a different “instance”.
Eventually, if the program is written correctly, the slightly different arguments will become sufficiently different from the first arguments that the final instance will stop.
• Building Robots | Same model, different serial number ... | |
• Recursive Definition Parts | Walk until you stop ... | |
• Recursion with list | Using a list as the test whether to recurse. | |
• Recursive triangle function | ||
• Recursion with cond | ||
• Recursive Patterns | Often used templates. | |
• No Deferment | Don’t store up work ... | |
• No deferment solution |