count method

int count(
  1. bool where(
    1. T
    )
)

Counts all elements for which where returns true

Implementation

int count(bool Function(T) where) {
  var c = 0;
  for (final element in this) {
    if (where(element)) {
      ++c;
    }
  }
  return c;
}