DEV Community

Discussion on: Explain functional programming to me like I'm five

Collapse
 
vonheikemen profile image
Heiker • Edited

Functional programming is a lot like playing with legos. You grab one lego, connect it with another lego and the result is yet another lego that can potentially be connected with other legos. It's legos all the way down.

To me functional programming is programming with pure functions. Use pure functions as much as you can. A lot of fancy patterns exists only to enable you to do "impure" things while still being technically pure (which is the best kind of pure).

To finish I'll just leave this right here.
Anjana Vakil — Functional Programming in JS: What? Why? How?
Scott Wlaschin - The Power of Composition

Okay, one last thing. I've documented everything I know about functional programming here on DEV, if anyone is interested you can find a guide here.