match<A, B> function

Task<B> Function(TaskOption<A> ) match<A, B>({
  1. required B onNone,
  2. required B onSome(
    1. A
    ),
})

Implementation

T.Task<B> Function(
  TaskOption<A>,
) match<A, B>({
  required B onNone,
  required B Function(A) onSome,
}) =>
    (taskOption) => () => taskOption().then(
          O.match(
            onNone: onNone,
            onSome: onSome,
          ),
        );