static > A addAndRemoveSomeRandomStrings(A set, int nAdd, int nRemove) { repeat nAdd { set.add(aGlobalID()); } var it = shuffledIterator(cloneList(set)); while (nRemove-- > 0 && it.hasNext()) set.remove(it.next()); ret set; }