Introduction to functional programming
We briefly discussed functional programming and F# in Chapter 1, Getting Started. In the F# primer section, we said that functional programming treats programs as mathematical expressions and evaluates expressions. It focuses on functions and constants, which don't change like variables and states. Functional programming solves complex problems with simple code; it is a very efficient programming technique for writing bug-free applications; for example, the null exception can be avoided using this technique.
Functional programming is language-agnostic, which means it is not language-specific. Functional programming focuses on a structured approach; it doesn't have multiple entry and exit points. It doesn't have goto statements, so it is easy to create small modules and create large modules using small blocks of structured code (or in other words sub-modules), which increases the re-usability of code. One function can be used as the input of another function...