code_junkie

Why doesn't .NET/C# optimize for tail-call recursion

Nov 13th, 2011
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.13 KB | None | 0 0
  1. private static void Foo(int i)
  2. {
  3. if (i == 1000000)
  4. return;
  5.  
  6. if (i % 100 == 0)
  7. Console.WriteLine(i);
  8.  
  9. Foo(i+1);
  10. }
Add Comment
Please, Sign In to add comment