getOrElse method

IO<R> getOrElse(
  1. R orElse(
    1. L l
    )
)

Convert this IOEither to a IO.

The IO returns a Right when IOEither returns Right. Otherwise map the type L of IOEither to type R by calling orElse.

Implementation

IO<R> getOrElse(R Function(L l) orElse) =>
    IO(() => run().match(orElse, identity));