mapEitherBoth<L2, S> method

Pipeline<T, Either<L2, S>> mapEitherBoth<L2, S>(
  1. L2 f1(
    1. L
    ),
  2. S f2(
    1. R
    )
)

Implementation

Pipeline<T, Either<L2, S>> mapEitherBoth<L2, S>(
  L2 Function(L) f1,
  S Function(R) f2,
) {
  return Pipeline<T, Either<L2, S>>((T input) {
    return run(input).fold(
      (l) => Left(f1(l)),
      (r) => Right(f2(r)),
    );
  });
}