alt method
When this IOOption returns Some, then return the current IOOption.
Otherwise return the result of orElse
.
Used to provide an alternative IOOption in case the current one returns None.
Implementation
@override
IOOption<R> alt(covariant IOOption<R> Function() orElse) =>
IOOption(() => run().match(
() => orElse().run(),
some,
));