23 May 2024
Alex Miller
Clojure 1.12.0-alpha12 is now available! Find download and usage information on the Downloads page.
Java programs define "functions" with Java functional interfaces (marked with the @FunctionalInterface annotation), which have a single method.
Clojure developers can now invoke Java methods taking functional interfaces by passing functions with matching arity. The Clojure compiler implicitly converts Clojure functions to the required functional interface by constructing a lambda adapter. You can explicitly coerce a Clojure function to a functional interface by hinting the binding name in a let
binding, e.g. to avoid repeated adapter construction in a loop.
See: CLJ-2799