In functional programming languages you may find yourself overflowing the stack. This post describes techniques to achieve unbounded recursion without fear of the stack. TL;DR The name of the game is staying tail recursive Enable tail recursion by passing down computed values Stick to one recursive call at a time by passing down a list of recursions to be done If we reach a stack overflow it is because we are not taking advantage of tail recursion. The fix is: use tail recursion. How to do th...