retain method

void retain(
  1. bool f(
    1. T
    )
)

Retains only the elements specified by the predicate where the result is true.

Implementation

@pragma('vm:prefer-inline')
void retain(bool Function(T) f) => retainWhere(f);