November 2017
Intermediate to advanced
386 pages
9h 22m
English
There's yet one other possibility you might want to explore, but that falls beyond the realm of FP, and rather into algorithm design. It's a computer science fact that any algorithm that is implemented using recursion has an equivalent version that doesn't use recursion at all and rather depends on a stack. There are ways to systematically transform recursive algorithms into iterative ones, so if you run out of all options (meaning: not even continuations or thunks help you) then you'd have a final opportunity, by replacing all recursion with iteration. We won't be getting into it --as I said, this elimination has little to do with FP-- but it's important to know that the tool exists and you might be able to use it. ...