« Continuation Passing Style Anonymous Methods | Main | Code and Data »

March 07, 2007


TrackBack URL for this entry:

Listed below are links to weblogs that reference Anonymous Recursion:

» Anonymous Recursion from DotNetKicks.com
You've been kicked (a good thing) - Trackback from DotNetKicks.com [Read More]


Zane Tailor

In your first code sample you use YFunc and Func. Is that a typo? If not, what is Func?

Wesner Moise

Func is a generic delegate type defined in Visual Studio Orcas/C# 3.0/VB 9.0.

delegate T Func(A a);
delegate T Func();
delegate T Func


Comments don't accept less-than and greater-than symbols.

delegate T Func{A,T}(A a);
delegate T Func{T}();
delegate T Func{A1,A2,T}(A1 a1, A2 a2);

cycling clothing

The combinator does not allowed to use recursion, only function application, in its definition, since it's purpose is to introduce a form of recursion in the first place.

The Y combinator is possible in a typed language like C# because C# allows us to recursively define types--that is, YFunc was defined in terms of itself. A slight modification, an additional lambda expression, was also needed to allow f(y(y)) to be called by name.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment

My name is Wesner Moise. I am a software entrepreneur developing revolutionary AI desktop applications. I worked as a software engineer in Microsoft Excel group for six years during the 1990s. I worked on PivotTables and wrote the most lines of code in Excel 97-- about 10 times the median developer. I have a Harvard BA in applied math/computer science and a UCLA MBA in technology entrepreneurship. I am a member of the Triple Nine Society, a 99.9 percentile high-IQ society.

December 2013

Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31