Functional programming

functionalfunctional programming languagefunctional languagefunctional programming languagesfunctional languagesfunctional programfunctionsfunctionfunctional (Delphi dialect only)functional programs
In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.wikipedia
722 Related Articles

Programming paradigm

Multi-paradigmmulti-paradigm programming languageprogramming paradigms
In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.
In functional programming, programs are treated as a sequence of stateless function evaluations.

Scheme (programming language)

SchemeScheme programming languageR6RS
However, programming languages that support functional programming have been used in industry, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, OCaml, Haskell, and F#. Later dialects, such as Scheme and Clojure, and offshoots such as Dylan and Julia, sought to simplify and rationalise Lisp around a cleanly functional core, while Common Lisp was designed to preserve and update the paradigmatic features of the numerous older dialects it replaced.
Scheme is a programming language that supports multiple paradigms, including functional and imperative programming.

Clojure

Rich HickeyClojureScriptClojure programming language
However, programming languages that support functional programming have been used in industry, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, OCaml, Haskell, and F#. Later dialects, such as Scheme and Clojure, and offshoots such as Dylan and Julia, sought to simplify and rationalise Lisp around a cleanly functional core, while Common Lisp was designed to preserve and update the paradigmatic features of the numerous older dialects it replaced.
Clojure (, like closure) is a modern, dynamic, and functional dialect of the Lisp programming language on the Java platform.

Common Lisp

QuicklispANSI Common LispArmed Bear Common Lisp
However, programming languages that support functional programming have been used in industry, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, OCaml, Haskell, and F#. Later dialects, such as Scheme and Clojure, and offshoots such as Dylan and Julia, sought to simplify and rationalise Lisp around a cleanly functional core, while Common Lisp was designed to preserve and update the paradigmatic features of the numerous older dialects it replaced.
It supports a combination of procedural, functional, and object-oriented programming paradigms.

Erlang (programming language)

ErlangErlang programming languageErlang/OTP
However, programming languages that support functional programming have been used in industry, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, OCaml, Haskell, and F#.
Erlang is a general-purpose, concurrent, functional programming language, and a garbage-collected runtime system.

Assignment (computer science)

assignmentsingle assignmentassignment operator
In contrast, imperative programming changes state with statements in the source code, the simplest example being assignment.
However, some languages (primarily strictly functional) do not allow that kind of "destructive" reassignment, as it might imply changes of non-local state.

F Sharp (programming language)

F#F# programming language F# (programming language)
However, programming languages that support functional programming have been used in industry, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, OCaml, Haskell, and F#.
F# (pronounced F sharp) is a general purpose, strongly typed, multi-paradigm programming language that encompasses functional, imperative, and object-oriented programming methods.

JavaScript

Server-side JavaScriptclient-side JavaScriptJS
JavaScript, one of the world's most widely distributed languages, has the properties of a dynamically typed functional language, in addition to imperative and object-oriented paradigms.
As a multi-paradigm language, JavaScript supports event-driven, functional, and imperative (including object-oriented and prototype-based) programming styles.

Wolfram Language

MathematicaWolfram
However, programming languages that support functional programming have been used in industry, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, OCaml, Haskell, and F#.
It emphasizes symbolic computation, functional programming, and rule-based programming and can employ arbitrary structures and data.

XQuery

queriedXML query language
Functional programming is also key to some languages that have found success in specific domains, like R in statistics, J, K and Q in financial analysis, and XQuery/XSLT for XML.
XQuery (XML Query) is a query and functional programming language that queries and transforms collections of structured and unstructured data, usually in the form of XML, text and with vendor-specific extensions for other data formats (JSON, binary, etc.).

Immutable object

immutableimmutabilitymutable
In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.
In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created.

Haskell (programming language)

HaskellHaskell programming languageHackage
However, programming languages that support functional programming have been used in industry, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, OCaml, Haskell, and F#.
The committee's purpose was to consolidate existing functional languages into a common one to serve as a basis for future research in functional-language design.

Scala (programming language)

ScalaScala programming languageScala.js
A hybrid case is that of Scala – it is frequently written in a functional style, but the presence of side effects and mutable state place it in a grey area between imperative and functional languages.
Scala is a general-purpose programming language providing support for functional programming and a strong static type system.

Declarative programming

declarativedeclarative languagedeclarative programming language
It is a declarative programming paradigm in that programming is done with expressions or declarations instead of statements.
Common declarative languages include those of database query languages (e.g., SQL, XQuery), regular expressions, logic programming, functional programming, and configuration management systems.

Referential transparency

referentially transparentreferential safetyreferentially transparent positions
Because of this, they lack referential transparency, that is, the same language expression can result in different values at different times depending on the state of the executing program.
In functional programming only referentially transparent functions are considered.

Side effect (computer science)

side effectsside effectside-effects
Eliminating side effects, that is, changes in state that do not depend on the function inputs, can make understanding a program easier, which is one of the key motivations for the development of functional programming.
In functional programming, side effects are rarely used.

OCaml

MetaOCamlOCaml Package ManagerOPAM
However, programming languages that support functional programming have been used in industry, including Common Lisp, Scheme, Clojure, Wolfram Language, Racket, Erlang, OCaml, Haskell, and F#.
OCaml unifies functional, imperative, and object-oriented programming under an ML-like type system.

Dylan (programming language)

DylanDylan programming language
Later dialects, such as Scheme and Clojure, and offshoots such as Dylan and Julia, sought to simplify and rationalise Lisp around a cleanly functional core, while Common Lisp was designed to preserve and update the paradigmatic features of the numerous older dialects it replaced.
Dylan is a multi-paradigm programming language that includes support for functional and object-oriented programming (OOP), and is dynamic and reflective while providing a programming model designed to support generating efficient machine code, including fine-grained control over dynamic and static behaviors.

XSLT

XSL TransformationsExtensible Stylesheet Language TransformationsXSL Transformation
Functional programming is also key to some languages that have found success in specific domains, like R in statistics, J, K and Q in financial analysis, and XQuery/XSLT for XML.
XSLT is influenced by functional languages, and by text-based pattern matching languages like SNOBOL and AWK.

APL (programming language)

APLAPL programming languageA Programming Language
Kenneth E. Iverson developed APL in the early 1960s, described in his 1962 book A Programming Language (ISBN: 9780471430148).
It has been an important influence on the development of concept modeling, spreadsheets, functional programming, and computer math packages.

Recursion

recursiverecursivelyrecursive function
Functional programming has its origins in lambda calculus, a formal system developed in the 1930s to investigate computability, the Entscheidungsproblem, function definition, function application, and recursion.
The joke is part of the Functional programming folklore and was already widespread in the functional programming community before the publication of the aforementioned books.

Combinatory logic

combinatorcombinator calculuscombinators
An equivalent theoretical formulation, combinatory logic, is commonly perceived as more abstract than lambda calculus and preceded it in invention.
It was introduced by Moses Schönfinkel and Haskell Curry, and has more recently been used in computer science as a theoretical model of computation and also as a basis for the design of functional programming languages.

Programming language

programming languageslanguagedialect
Many functional programming languages can be viewed as elaborations on the lambda calculus.
More refined paradigms include procedural programming, object-oriented programming, functional programming, and logic programming; some languages are hybrids of paradigms or multi-paradigmatic.

ML (programming language)

MLML programming languageML family
The 1973 language ML was created by Robin Milner at the University of Edinburgh, and David Turner developed the language SASL at the University of St Andrews.
ML ("Meta Language") is a general-purpose functional programming language.

Computer program

programprogramscomputer programs
In computer science, functional programming is a programming paradigm—a style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.
Two broad categories of declarative languages are functional languages and logical languages.