Type inference
I have already outlined type inference earlier in the chapter. It is a feature of F# (as well as many other languages: C#, to begin with) that stems from its property of being statically typed. By following the natural code flow direction from top to bottom and from left to right, the F# compiler is capable of deriving types of values present in the code, including function types. This ability, in turn, allows you to omit explicit type declarations from the F# code. In the end, the code can be written faster, is quite succinct, and if it compiles, is consistent type-wise.
Relying on type inference is not mandatory when writing the F# code. Adding an explicit declaration to the code may be especially meaningful in the following scenarios:
When the types cannot be inferred and the compiler prompts for the explicit declaration
If the code's author believes that providing explicit type declaration in some cases may simplify the code understanding and improve its readability
The most...