fromOption<S, C, E, A> function

StateReaderTaskEither<S, C, E, A> Function(Option<A> fa) fromOption<S, C, E, A>(
  1. E onNone()
)

Implementation

StateReaderTaskEither<S, C, E, A> Function(Option<A> fa) fromOption<S, C, E, A>(
  E Function() onNone,
) =>
    (fa) => fa.chain(O.fold(() => left(onNone()), (a) => right(a)));