using System.Linq; using System.Collections; using System.Collections.Generic; using System; class c { public static void Main() { var l = MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList(MakeList( MakeList((object)"", 1) )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); Console.WriteLine(l.GetType()); } static IEnumerable<Item> MakeList<Item>(Item value, int count) { for (int i = 0; i < count; ++i) yield return value; } static IEnumerable<Item> MakeList<Item>(Item value) where Item:IEnumerable { foreach(object o in value) yield return value; } }
Standard input is empty
prog.cs(36,24): warning CS0219: The variable `o' is assigned but its value is never used Compilation succeeded - 1 warning(s)
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]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]