map<L, R, R2> function
Transform a TaskEither's value if it is Right.
expect(
await right('hello').chain(map((s) => '$s world'))(),
E.right('hello world'),
);
expect(
await left('fail').chain(map((s) => '$s world'))(),
E.left('fail'),
);
Implementation
TaskEither<L, R2> Function(TaskEither<L, R> taskEither) map<L, R, R2>(
R2 Function(R value) f,
) =>
(fa) => TaskEither(fa.p(task.map(either.map(f))));