Let's say I have a Set of Integers, and I want to increment every Integer in the Set. How would I do this?
Am I allowed to add and remove elements from the set while iterating it?
Would I need to create a new set that I would "copy and modify" the elements into, while I'm iterating the original set?
EDIT: What if the elements of the set are immutable?