Created
December 11, 2013 08:12
-
-
Save Wind4/7906699 to your computer and use it in GitHub Desktop.
Lambda 递归
This file contains 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; | |
namespace Alogrithm | |
{ | |
public class Recursion | |
{ | |
public static Func<T, TResult> Fix<T, TResult>(Func<Func<T, TResult>, Func<T, TResult>> f) | |
{ | |
return n => f(Fix(f))(n); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment