Browse Clojure Foundations for Java Developers

Higher-Order Functions

Build expressive pipelines with map, filter, reduce, and function composition.

In Clojure, you do not write loops by default—you transform collections with higher-order functions. This chapter teaches the core building blocks (map, filter, reduce, into, comp, partial) and the mental model behind them.

If you have used Java Streams, some of this will feel familiar, but the Clojure style is usually simpler and more composable. The emphasis is on building readable pipelines where each step is a small, testable function.

By the end, you should be able to look at a sequence transformation problem and reach for a pipeline instead of an index-based loop.

In this section

Revised on Friday, April 24, 2026