mapLeft<L1, L2, R> function
Transforms the wrapped value if the Either is a Left.
expect(
left('fail').chain(mapLeft((s) => '${s}ure')),
equals(left('failure')),
);
Implementation
Either<L2, R> Function(Either<L1, R> either) mapLeft<L1, L2, R>(
L2 Function(L1 value) f,
) =>
fold(f.compose(left), right);