private IEnumerator GetEnumerator(StackNode n) { while (n != null) { yield return n.Value; n = n.Prev; } }