combine4<L, R1, R2, R3, R4> static method

Either<L, (R1, R2, R3, R4)> combine4<L, R1, R2, R3, R4>(
  1. Either<L, R1> first,
  2. Either<L, R2> second,
  3. Either<L, R3> third,
  4. Either<L, R4> fourth,
)

Implementation

static Either<L, (R1, R2, R3, R4)> combine4<L, R1, R2, R3, R4>(
  Either<L, R1> first,
  Either<L, R2> second,
  Either<L, R3> third,
  Either<L, R4> fourth,
) =>
    combine3(first, second, third).combine(fourth).map(
          (p) => (
            p.$1.$1,
            p.$1.$2,
            p.$1.$3,
            p.$2,
          ),
        );