Пример #1
0
        public IEnumerator <CubeList <T> > GetEnumerator()
        {
            CubeList <T> c = next(self);

            for (int i = 0; i < count && c != null; i++)
            {
                yield return(c);

                c = next(c);
            }
        }
Пример #2
0
 public LCube(CubeList <T> self, Func <CubeList <T>, CubeList <T> > next, int count)
 {
     this.self  = self;
     this.next  = next;
     this.count = count;
 }