Functional Programming
7 lessons in this section of the Java tutorial. Work through them in order, or jump to the one you need.
- 1.Functional Programming Basics
Functional programming is a programming paradigm that treats computation as the evaluation and composition of functions, favors expressions that produce values over…
- 2.Pure Functions
A pure function is a function whose return value depends solely on the arguments passed to it, with no dependence on any hidden or external state, and which produces no…
- 3.Higher Order Functions
A higher-order function is a function that takes one or more other functions as parameters, returns a function as its result, or both — as opposed to a first-order…
- 4.Closures
A closure is a function bundled together with the variables from its enclosing lexical scope that it refers to, captured at the time the function is created, so that the…
- 5.Currying
Currying is the technique of transforming a function that accepts multiple arguments into a chain of functions that each accept exactly one argument, so that calling the…
- 6.Immutable Programming
Immutable programming in Java refers to a design discipline — not a single language feature — of constructing objects whose observable state cannot change after…
- 7.Stream Pipelines
A stream pipeline is the architectural pattern underlying the Streams API (introduced in Java 8 alongside lambdas): a source, followed by zero or more intermediate…