Clojure's fn, anonymous function shorthand, and how it compares to Java lambdas.
Java and Clojure can both express “pass behavior to another function”, but the default style looks different.
Function, Predicate, etc.).fn.1(map (fn [x] (* x 2)) [1 2 3])
2(map #(* % 2) [1 2 3])
#() when it stays short and readable.Java mental model: method references and lambdas map well to passing vars and anonymous functions, but Clojure encourages smaller functions and more composition.
The goal is not to memorize syntax. It is to pick the form that makes the pipeline easiest to read and maintain.