Perl was big in 2001 and had closures and first-class functions.
And let's not forget great book Higher-Order Perl: Transforming Programs with Programs http://hop.perl.plover.com/
And let's not forget great book Higher-Order Perl: Transforming Programs with Programs http://hop.perl.plover.com/
But code generation and execution during runtime, which is what I think you meant, is capable in any language with eval().
Perl claims to have a compilation stage, by which the documentation means that the lexer and parser produce an optree, which the runtime phase traverses. During that compilation stage, it's possible to run code which changes how the parser will treat subsequent syntactic elements.