mutate method

void mutate(
  1. void mutator(
    1. Set<E> set
    )
)

Mutate the set in-place and notify listeners.

High performance alternative for huge sets. Bypasses object allocation and equality checks.

Implementation

void mutate(void Function(Set<E> set) mutator) {
  mutator(value);
  notifyListeners();
}