retainWhere method

ImmortalSet<T> retainWhere(
  1. bool predicate(
    1. T value
    )
)

Returns a copy of this set where all values that fail to satisfy the given predicate are removed from.

Implementation

ImmortalSet<T> retainWhere(bool Function(T value) predicate) =>
    _mutateAsSet((set) => set..retainWhere(predicate));