@SuppressWarnings("unchecked")
    public static <E> OrderedPSet<E> from(Iterable<? extends E> list) {
        if (list instanceof OrderedPSet)
            return (OrderedPSet<E>) list;
        return OrderedPSet.<E>empty().plusAll(list);
    }