Created
May 13, 2014 17:39
-
-
Save moswald/6f4da4540d4f1da316eb to your computer and use it in GitHub Desktop.
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
public static class ListMixins | |
{ | |
public static IEnumerable<T> Forever<T>(this IList<T> This) | |
{ | |
using (var e = This.GetEnumerator()) | |
{ | |
for (; ; ) | |
{ | |
while (e.MoveNext()) | |
{ | |
yield return e.Current; | |
} | |
e.Reset(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment