all method
Returns true
if all elements match the given predicate.
Example:
5, 19, 2
.all(isEven), isFalse)
6, 12, 2
.all(isEven), isTrue)
Implementation
bool all(bool predicate(T pred)?) {
for (var e in this) {
if (!predicate!(e)) return false;
}
return true;
}