(See also: Part 1 and Part 2.)
In Part II, we offered an example of a function (written in both LFE and Elixir) that requires recursion to function correctly. One takeaway from this is that algorithms requiring trees and DAGs will require recursion more frequently than other programs. However, in my opinion, it is always preferable to use map/reduce/filter where you can in other, non-tree/DAG-based algorithms. One question that arises from this programming heuristic is, are there non-tree/DAG algorithms for which recursion is the only possible methodology? However, I will save that question for another day. :)
As always, if you enjoyed this series, you can buy me a coffee here: https://buymeacoffee.com/danieljaouen . Any support you give is greatly appreciated.
Thanks!