reduceOrNone method
Reduces the collection to a single value by iteratively combining elements. Returns the result as a Some, or None if the Iterable is empty.
Implementation
Option<T> reduceOrNone(T Function(T value, T element) combine) {
if (isEmpty) return const None();
return Some(reduce(combine));
}