doOption<A> function
Implementation
Option<A> doOption<A>(
A Function(
B Function<B>(Option<B>),
) f,
) {
try {
return Some(
f(
<B>(option) => switch (option) {
None() => throw _EvalException(null),
Some(value: final value) => value
},
),
);
} on _EvalException<A> {
return None();
}
}