public int size() { int size = 0; Seq<X> seq = this; while (seq.nonEmpty()) { assert seq.isEmpty() || seq instanceof BoundedList; seq = seq.tail(); size++; } return size; }