Section: IT & Technology · Software DevelopmentDifficulty: Medium

Functional Programming

USUK

A programming paradigm treating computation as evaluation of mathematical functions.

Also: FP

Definition

Functional programming (FP) is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids changing state or mutable data. Core concepts include pure functions (same input always produces same output, no side effects), immutability, higher-order functions (functions that take or return other functions), and function composition. FP improves testability, concurrency safety, and reasoning about code. Languages like Haskell are purely functional; JavaScript, Python, and Scala support functional styles alongside other paradigms.

Example

Using functional programming in JavaScript, a developer uses map, filter, and reduce instead of loops to transform a list of user objects into a summary of active users' total spending without mutating the original data.

Synonyms

  • FP
  • declarative programming
  • pure function programming

Antonyms / Opposites

  • imperative programming
  • object-oriented programming
  • procedural programming

Images

CC-licensed · free to use
More on Wikimedia
Loading images…

Video

  • object-oriented-programming
  • design-pattern
  • recursion
  • unit-testing

Dictionary Entry

Back to IT & Technology