C# has inner (local) functions which are close in semantics to lambdas but have names. I didn’t think I’d use them at first, but actually I use them all the time and often prefer them to raw lambdas.
#include <cstdio>
int main() {
auto square = [](double x) -> double { return x*x; };
printf("%f\n", square(10));
return 0;
}
since 2011