alt method

  1. @override
IOEither<L, R> alt(
  1. covariant IOEither<L, R> orElse()
)
override

When this IOEither returns Right, then return the current IOEither. Otherwise return the result of orElse.

Used to provide an alternative IOEither in case the current one returns Left.

Implementation

@override
IOEither<L, R> alt(covariant IOEither<L, R> Function() orElse) =>
    IOEither(() => run().match((_) => orElse().run(), right));