public IEnumerator <T> GetEnumerator() { SList <T> cur = this; while (cur != Nil) { yield return(cur.m_v); cur = cur.m_nxt; } }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { SList <T> cur = this; while (cur != Nil) { yield return(cur.m_v); cur = cur.m_nxt; } }
public SList(T val, SList <T> next) { m_v = val; m_nxt = next; }