Next: , Previous: dolist dotimes, Up: Loops & Recursion

11.3 Recursion

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.