flatMap<L, R1, R2> function

Either<L, R2> Function(Either<L, R1> either) flatMap<L, R1, R2>(
  1. Either<L, R2> f(
    1. R1
    )
)

Implementation

Either<L, R2> Function(
  Either<L, R1> either,
) flatMap<L, R1, R2>(
  Either<L, R2> Function(R1) f,
) =>
    (either) => switch (either) {
          Right() => f(either.value),
          Left() => Left(either.value)
        };