ReaderTaskEither<E, L, R>.fromIOOption constructor
ReaderTaskEither<E, L, R>.fromIOOption (
- IOOption<
R> io, - L onNone()
Build a ReaderTaskEither that returns a Right containing the result of running io
,
or the result of onNone
if io
is Left.
Implementation
factory ReaderTaskEither.fromIOOption(
IOOption<R> io,
L Function() onNone,
) =>
ReaderTaskEither(
(_) async => Either.fromOption(io.run(), onNone),
);