SimpleList(E e, SimpleList <E> r) { this.last = e; this.butlast = r; this.k = 1 + r.k; }
/// <summary> /// Creates a new simple list by appending elem at the end of this list. /// </summary> /// <param name="elem">element to append</param> public SimpleList <E> Append(E elem) { var res = new SimpleList <E>(elem, this); return(res); }
SimpleList() { this.butlast = null; this.k = 0; this.last = default(E); }