Created
May 25, 2017 15:27
-
-
Save palladin/d7103bd31dcac1734a285067dcf2dedf to your computer and use it in GitHub Desktop.
Y combinator (dynamic)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
public class C { | |
public void M() { | |
Func<Func<dynamic, dynamic>, dynamic> fd = x => x; | |
dynamic Y = fd(f => fd(x => f(fd(y => x(x)(y))))(fd(x => f(fd(y => x(x)(y)))))); | |
Y(fd(f => fd(x => f(x))))(42); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment