Skip to content

Instantly share code, notes, and snippets.

@JeffreyZhao
Created January 14, 2013 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JeffreyZhao/4529202 to your computer and use it in GitHub Desktop.
Save JeffreyZhao/4529202 to your computer and use it in GitHub Desktop.
public static int Fac(int n, Func<int, int> cont) {
if (n == 0) return cont(1);
return Fac(n - 1, r => cont(n * r));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment