public ListBuffer<A> append(A x) {
        x.getClass(); // null check
        if (shared) copy();
        last.head = x;
        last.setTail(new List<A>(null,null));
        last = last.tail;
        count++;
        return this;
    }