Mutual Recursion
← Back to Recursion Patterns
Two or more functions that call each other in a cycle. For example, function A calls function B, which calls function A. Used in parsers, state machines, and mathematical definitions like even/odd number checking. Can be harder to optimize than direct recursion.