fromNullable<C, L, R> function

ReaderTaskEither<C, L, R> fromNullable<C, L, R>(
  1. R? value,
  2. L onNone()
)

Create a TaskEither from a nullable value. onNone is executed if the given value is null.

Implementation

ReaderTaskEither<C, L, R> fromNullable<C, L, R>(
  R? value,
  L Function() onNone,
) =>
    ReaderTaskEither((_) => TE.fromNullable(value, onNone));