Functional programming

Functional programming is an approach to programming in which programs are composed of functions that are evaluated rather than executed in sequence. These are not functions in the C sense but mathematical functions of the style f(x) = y + 2; that is, for a given input or set of inputs the function describes the result.

This is starkly different to imperative programming in which programs at the source code level mirror the sequential execution at the hardware level. Functional programming operates at a higher level of abstraction because it has no notion of sequence of operations and in fact operations don’t have any side effects.