all method
Returns true if all elements match the given predicate or if the
collection is empty.
Implementation
bool all(bool predicate(T element)) {
for (var element in this) {
if (!predicate(element)) {
return false;
}
}
return true;
}