What is Functional Programming?

Category: Programming

1Definition

A programming paradigm that treats computation as evaluating mathematical functions, avoiding changing state and mutable data.

2Context

Gaining popularity for its reliability. Languages like Haskell, Clojure, and features in JavaScript embrace it.

3Example

Instead of a for-loop that mutates a counter, functional programming uses map() to transform each element in a list.

Common Trap

Functional programming doesn't mean programs that work—it's a specific style emphasizing immutability and pure functions.

Related Terms

More Programming Terms

Look up any term instantly

Get clear definitions without the jargon

Try WhatIsIt.ai