@SuppressWarnings("unchecked")
    public static <E> TreePVector<E> from(Iterable<? extends E> list) {
        if (list instanceof TreePVector)
            return (TreePVector<E>) list; // (actually we only know it's ImmutableTreeList<? extends E>)

        // but that's good enough for an immutable
        // (i.e. we can't mess someone else up by adding the wrong type to it)
        return TreePVector.<E>empty().plusAll(list);
    }