Predecessor inherited language features
F# inherits the core of the features associated with its functional-first nature from ML and OCaml. This means that its chief fashion of expressing computations is via the definition and application of functions.
F# functions are first-class entities
The ability to define and apply functions is a common feature of many programming languages. However, F# follows ML and other functional programming languages in treating functions similarly to, say, numeric values. The ways of treating functions in F# go well beyond the limits usually associated with stored-program computer concept:
- Functions can be used as arguments to other functions; the latter are higher-order functions in this case
- Functions can be returned from other functions
- Functions can be computed from other functions, for example, with the help of function composition operators
- Functions can be elements of structures usually associated with data
Functions are free of side effects
Computations with...