Recursion is one of those things that functional programming languages shine at—but it seems a bit disappointing that in many cases, you have to convert your beautiful recursive function back into iterative form. After all, iteration is what imperative languages do best, right? Actually, explicitly tail-recursive functions in functional programming languages can be fairly beautiful: […]