Functional Programming With Java: map, filter, reduce

The three methods, map, filter, and reduce, are the cornerstone of any functional programming. Usually, our data pipelines consist of one or more intermediate operations, transforming (aka mapping) and/or filtering elements, and a terminal operation to gather the data again (aka reducing).

Functional Programming With Java: Exception Handling

In my previous articles about functional programming, I’ve shown how to incorporate a more functional style into our Java code. But I’ve omitted a crucial topic: how to deal with exceptions.

Functional Programming With Java: Immutability

As laid out in the first piece, immutability is one of the core concepts of functional programming. Real functional programming languages support it by design, at a language-level. But in Java and most non-functional languages, we need to design and implement it ourselves, at code-level.

Functional Programming With Java: Streams

Java 8 gave us the Stream API, a lazy-sequential data pipeline of functional blocks. It isn’t implemented as a data structure or by changing its elements directly. It’s just a dumb pipe providing the scaffolding to operate on, making it really a smart pipe.

Functional Programming With Java: What’s in the Box

In the previous part, we learned about Java’s functional capabilities. This time, we’ll go over the functional interfaces which are included in the JDK since Java 8’s introduction of lambdas.