Learn how Clojure APIs such as map, filter, reduce, sort-by, and custom helpers accept behavior as function arguments instead of forcing Java-style loop control.
Passing a function as an argument is the core move behind Clojure’s collection programming style. Instead of writing an index-based loop, you describe the transformation and supply the behavior that varies.
1(map inc [1 2 3]) ;; => (2 3 4)
2(filter even? [1 2 3 4]) ;; => (2 4)
Java mental model: similar to Streams, but you can do this with any seq-able data structure, and the pipeline reads like ordinary function calls.
The goal of this section is to make “function as argument” feel like the default tool for data transformation.