Overview

FP treats computation as the evaluation of mathematical functions. It emphasizes immutability and the use of pure functions (functions that always produce the same output for the same input and have no side effects).

Key Concepts

  • Pure Functions: No side effects, deterministic.
  • Immutability: Data cannot be changed after it is created.
  • First-Class Functions: Functions can be passed as arguments, returned from other functions, and assigned to variables.
  • Higher-Order Functions: Functions that take other functions as arguments or return them.

Common Languages

  • Haskell
  • Lisp
  • Elixir
  • JavaScript (supports FP patterns)

Related Terms