26 ms·
It seems that we've basically just moved the recursion from one place to another. Yes, the point is to move the recursion from the code into the data structure
by chongli 7y ago
It seems that we've basically just moved the recursion from one place to another.
Yes, the point is to move the recursion from the code into the data structures. These data structures can then be stored and retrieved conveniently. It's a technique for making micro eDSLs to solve common problems.
Having said that, it's a lot more applicable to some languages than others. Python, lacking algebraic data types and static typing, does not make it very convenient to use this technique.