Look ma, recursive lambda without "this" or bending the rules

Peter Levart peter.levart at marand.si
Tue Feb 23 08:41:32 PST 2010


Just for fun...

#int(int) factorial = new Object() { #int(int) f; { f = #(int x)(x == 0 ? 1 : x*f.(x-1)); } }.f;


Peter


More information about the lambda-dev mailing list