|
|
|
|
|
by lsiebert
2909 days ago
|
|
I mean, recursion is just a way of saving state on the program's call stack implicitly instead of explicitly in a stack data structure. fundamentally recursion is syntactical sugar over loops and stacks, as assembly can show you. C can do recursion. It can't do first class functions, though it can pass function pointers. It just can't create new functions dynamically based on non local variables, at least not without shenanigans. |
|