3 ms·
Honestly, I feel like recursion is the natural way to express transformations on any nexted data structure (like a list, tree, or graph). I think the major rea
by Periodic 17y ago
Honestly, I feel like recursion is the natural way to express transformations on any nexted data structure (like a list, tree, or graph). I think the major reason that many people don't see these data structures often is because some languages make recursion harder than iteration, so they stick with iteration across arrays and `for` loops.
Recursion is really a natural way to express almost any repeated operation on a computer.