Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Dart

Idiom #277 Remove an element from a set

Remove the element e from the set x.

Explains what happens if e was already absent from x.

x.remove(e);

Returns true if value was in the set, and false if not. The method has no effect if value was not in the set.
(disj x e)

Removing a non-existent element from a set returns back an identical set.

New implementation...