DELAPARRA
Index
Color
NL
Category: Programming paradigms

Functional Programming (FP)

Explained by Updated

What is Functional Programming (FP)?

Functional Programming (FP): Functions are treated like values — you pass them around, compose them, and return them. The key rule: a function always returns the same output for the same input, and never modifies anything outside itself. Functional programming is a style where functions are the main building blocks. Functions are values you can pass around and combine, and they avoid changing data outside themselves. The same input always gives the same output.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Functional Programming (FP)

How is Functional Programming (FP) used in practice?

Instead of loops that modify variables, you transform data step by step: filter the paid orders, map them to totals, then reduce them to a sum. Laravel collections, JavaScript array methods and SQL all encourage this style.

What should you keep in mind with Functional Programming (FP)?

The benefits are predictability and easy testing. Without hidden state, a function can be tested in isolation and reused safely. You do not need a purely functional language like Haskell to benefit. Writing small pure functions, avoiding shared mutable state and transforming data in clear steps improves code in any language.

At a glance

CategoryProgramming paradigms
Explained by
Updated

More Programming paradigms terms

All terms starting with F

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.