fold abstract method
Folds the two cases of this Option into a single Result.
The onSome
and onNone
functions must return a new Option.
Implementation
Result<Option<Object>> fold(
@noFutures Option<Object>? Function(Some<T> some) onSome,
@noFutures Option<Object>? Function(None<T> none) onNone,
);