Browse Clojure Foundations for Java Developers

Functions as First-Class Citizens

In Clojure, functions are values: pass them, store them, and compose them.

In Clojure, functions are not special “things you can only call”. They are values you can pass around like any other value: put them in maps, return them from functions, and build behavior by composition.

This is one of the biggest practical shifts from Java, where functions historically lived behind methods and interfaces.

Why it matters in real code

  • You build pipelines by assembling small functions.
  • You avoid deep inheritance trees by composing behavior.
  • You make “what varies” explicit by passing a function in.

Java mental model: similar to Java’s Function<T,R> and lambdas, but built into the language (no extra ceremony).

Once “functions are values” feels normal, higher-order functions stop looking magical and start looking like the simplest way to write clear data transformations.

In this section

Revised on Friday, April 24, 2026