reject<T> static method

List<T> reject<T>(
  1. Iterable<T> list,
  2. bool predicate(
    1. T
    )
)

Filters list to elements NOT matching predicate. Inverse of where.

Implementation

static List<T> reject<T>(Iterable<T> list, bool Function(T) predicate) => [
  for (final v in list)
    if (!predicate(v)) v,
];