Definition of Functional Programming

Functional programming uses "pure" functions that avoid state and mutable data, and, hence, have no side effects. Pure functions can be called repeatedly and will always give the same answer given the same inputs. By disallowing side effects, functional programs can be verified, optimized, and parallelized using automated tools. Functional programming has the following characteristics: higher-order functions, which are functions that can take other functions as parameters or return a function as a result; use of recursion instead of iteration; and lambda expressions, which are anonymous in-line functions in the form of => (for example, x => x*x). Functional programming took its inspiration from lambda calculus, a formal system developed in the 1930s for function definition, function application, and recursion.