fork download
  1. using System.Linq;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System;
  5.  
  6. class c
  7. {
  8. public static void Main()
  9. {
  10. var l =
  11. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  12. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  13. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  14. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  15. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  16. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  17. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  18. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  19. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  20. MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(
  21. MakeList((object)"", 1)
  22. ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));
  23. Console.WriteLine(l.GetType());
  24. }
  25.  
  26.  
  27. static IEnumerable<Item> MakeList<Item>(Item value, int count)
  28. {
  29. for (int i = 0; i < count; ++i)
  30. yield return value;
  31. }
  32.  
  33. static IEnumerable<Item> MakeList<Item>(Item value)
  34. where Item:IEnumerable
  35. {
  36. foreach(object o in value)
  37. yield return value;
  38. }
  39. }
stdin
Standard input is empty
compilation info
prog.cs(36,24): warning CS0219: The variable `o' is assigned but its value is never used
Compilation succeeded - 1 warning(s)
stdout
c+<MakeList>c__Iterator1`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Collections.Generic.IEnumerable`1[System.Object]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]