all method

bool all(
  1. bool f(
    1. T
    )
)

returns true if f applies to all items, otherwise false

Implementation

bool all(bool Function(T) f) {
  for (final x in this) {
    if (!f(x)) {
      return false;
    }
  }
  return true;
}