insn.clojure

Generate Clojure fns whose bodies are specified as bytecode.

defn

macro

(defn fname & args)
Bytecode version of `clojure.core/defn`. See `fn`.

If the fn name metadata or an attr-map contains :insn/version, it
specifies the bytecode version to generate.

Note that the pre/post condition map is not supported.

defn-

macro

(defn- fname & args)
Bytecode version of `clojure.core/defn-`. See `defn`.

fn

macro

(fn & args)
Bytecode version of `clojure.core/fn`. The optional fn name and
argument vector(s) are only for documentation, primitive type
hinting, or to indicate a variadic fn.

The fn body expressions are replaced by a single expression that
should evaluate to a fn that takes an ASM MethodVisitor. As a
shortcut, if the compile-time type of the body is a vector, it will be
compiled via `insn.op/compile`.