Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Erlang’s design was heavily influenced by functional and logic programming languages. When dealing with sequential programs, those familiar with languages such as Prolog, ML, or Haskell will recognize the influence they have had on Erlang’s constructs and development techniques. When working in functional programming languages, you replace iterative constructs such as while and for loops with recursive programming techniques.
Recursion is the most useful and powerful of all the techniques in a functional programmer’s armory. It allows a programmer to traverse a data structure via successive calls to the same function, with the patterns of function calls mirroring the structure of the data itself. The resulting programs are more compact and easier to understand and maintain. Functional programs are, importantly, side-effect-free, unless side effects are specifically needed for printing or for access to external storage.