Functional programming (FP) defines standard operations on collections.
Most of the operations, you perform on collections can be accomplished with five simple functions:
With functional programming (FP), the code is organized around:
- around how data flows between these pure functions to produce output data.
In the same vein that SQL,
- some operation defines a logical plan (meaning that you build a metadata object, there is no data movement)
- some operation triggers the execution (generally known as the terminal operation).
Multiple invocations of a function at different points in time will always return the same output as long as the input remains the same. It makes it easy to understand and predict the behavior of the program.
Imperative vs Functional
JVM based Functional Programming Languages