Removing recursion via explicit callstack simulation

I love recursion. As I’ve blogged about before , recursive implementations are usually the most maintainable way to solve inherently-recursive problems. That said, I do most of my programming in node.js and TypeScript, and I also love it when my code doesn’t overflow the stack. These things are sometimes in conflict. This post is about a technique for manually converting elegant, maintainable…