Recursion
A self-referential data structure or computation.
Related concepts: TypeReferenceFunctionCall
Closest Wikipedia entry: Recursion (computer science)
Misconceptions about Recursion14 documented Misconceptions
Check YourselfBaseCaseNotNeeded
Recursive computations do not necessarily need a base caseBaseCaseSelfRecursive
The base case of a structural recursion consists of a recursive self-callForEachTraversesRecursiveStructure
For-each loops know how to traverse any recursive data structureRecursiveActivationsShareFrame
Recursive calls of a method share a stack frameRecursiveCallSiteNoReturn
Tail-recursive call sites have no continuationRecursiveMethodImpliesRecursiveType
A class with a recursive method represents part of a recursive data structureRecursiveMethodNeedsIfElse
A recursive method needs to contain an if-else statementReferringToRecursiveStructureMakesRecursive
A class referring to a recursive data structure is (indirectly) part of that recursion as wellReturnUnwindsMultipleFrames
A return statement can unwind multiple call stack framesUseOfSelfTypeImpliesRecursiveType
If a class has a method that has a local variable, parameter, or return value with the class as its type, the class is a recursive typeVoidMethodNotRecursive
A method with void return type can't be recursive