It may be difficult to see, but the approach to avoiding mutability here in the collections example is solved in the same way as the user name example by creating new copies of the data instead of modifying the originals.