Skip to content

Instantly share code, notes, and snippets.

@1tgr
Created January 10, 2010 13:33
Show Gist options
  • Select an option

  • Save 1tgr/273521 to your computer and use it in GitHub Desktop.

Select an option

Save 1tgr/273521 to your computer and use it in GitHub Desktop.
IEnumerable<int> nums()
{
yield return 1;
foreach (int n in nums())
yield return n+1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment