Re:SICP Goodness – Why you don't need looping constructs
by mannykannot on Friday June 29, 2018 @10:15AM
(#17424619)
If you are dealing with something other than a sequence, such as a tree or a more general network, recursion is often the more insightful way to think about a solution.
Actually, the simplest example I can think of where this the case involves a sequence: binary search.
On the other hand, if you have to significantly rework the conceptual recursive solution to put it in tail-recursive form, an implementation using loops may end up being easier to understand.
Actually, the simplest example I can think of where this the case involves a sequence: binary search.
On the other hand, if you have to significantly rework the conceptual recursive solution to put it in tail-recursive form, an implementation using loops may end up being easier to understand.