This section aims to consolidate your understanding of functional programming and when you should use it.
Functional programming is based on the following features:
- Pure functions
- First-class functions
- Higher-order functions
- Function composition
- Typeclasses
- Lambdas
- Closures
- Immutability
Contrary to object-oriented languages, which are written in an imperative style, functional programming languages are written in a declarative style.