> The part that I'm having trouble understanding is the fact that
> functions can be defined at runtime. How do you compile a function
> that's not defined until after you run the program?
It is possible to define functions at runtime only by calling eval on
a form that evaluates to a function. These functions are obviously not
compiled "ahead of time" (a rather strange expression), they are
compiled when eval is called. This is why the Clojure compiler is part
of the run-time system.
Perhaps you were thinking of functions that return functions. These
functions are perfectly well defined statically, they just usually
capture variables from their surrounding functions, i.e. they are
closures. Closures are compiled into classes with fields that are
filled in when the closure object is created, so they pose no problem
for AOT compilation.
Konrad.