It seems quite a few mainstream languages support function literals these days. They are also called anonymous functions, but I don\'t care if they have a name. The important th
You can do it in Perl:
my $factorial = do { my $fac; $fac = sub { my $n = shift; if ($n < 2) { 1 } else { $n * $fac->($n-1) } }; }; print $factorial->(4);
The do block isn't strictly necessary; I included it to emphasize that the result is a true anonymous function.
do