minBy method
Returns the element that gives the minimum value with respect to the specified comparison function.
Implementation
@override
Option<T> minBy(int Function(T, T) f) {
T min;
if (moveNext()) {
min = current;
} else {
return None;
}
for (final element in this) {
if (f(element, min) < 0) {
min = element;
}
}
return Some(min);
}