fromNullableK<C, L, R, A> function

ReaderTaskEither<C, L, R> Function(A value) fromNullableK<C, L, R, A>(
  1. R? f(
    1. A value
    ),
  2. L onNone(
    1. A value
    )
)

Create a TaskEither from a nullable value. onNone is executed if the value (given to the returned function) is null.

Implementation

ReaderTaskEither<C, L, R> Function(A value) fromNullableK<C, L, R, A>(
  R? Function(A value) f,
  L Function(A value) onNone,
) =>
    (a) => fromNullable(f(a), () => onNone(a));