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); } }
public LCube(CubeList <T> self, Func <CubeList <T>, CubeList <T> > next, int count) { this.self = self; this.next = next; this.count = count; }