We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Similarly to Set.remove, Set.add should return a bool so one can avoid doing:
if (mySet.contains(o)) { throw 'not unique'; } mySet.add(o);
And instead do:
if (!mySet.add(o)) { throw 'not unique'; }