map<L, R, NR> function
Transforms the wrapped value if the Either is a Right.
expect(
right(1).chain(map((i) => i * 2)),
equals(right(2)),
);
Implementation
Either<L, NR> Function(Either<L, R> either) map<L, R, NR>(
NR Function(R value) f,
) =>
fold(left, f.compose(right));