and<R> method
Returns other when this option is present, and None otherwise.
final next = const Some<int>(1).and(const Some<String>('a')); // Some(a)
Implementation
Option<R> and<R>(Option<R> other) {
return switch (this) {
Some<T>() => other,
None<T>() => None<R>(),
};
}