Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unnecessary restriction on biFlatMap #2837

Merged
merged 4 commits into from
May 10, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/src/main/scala/cats/data/EitherT.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ final case class EitherT[F[_], A, B](value: F[Either[A, B]]) {
applicativeG: Applicative[G]): G[EitherT[F, C, D]] =
applicativeG.map(traverseF.traverse(value)(axb => Bitraverse[Either].bitraverse(axb)(f, g)))(EitherT.apply)

def biflatMap[AA >: A, BB >: B](fa: A => EitherT[F, AA, BB],
fb: B => EitherT[F, AA, BB])(implicit F: FlatMap[F]): EitherT[F, AA, BB] =
def biflatMap[AA, BB](fa: A => EitherT[F, AA, BB],
AdrianRaFo marked this conversation as resolved.
Show resolved Hide resolved
fb: B => EitherT[F, AA, BB])(implicit F: FlatMap[F]): EitherT[F, AA, BB] =
EitherT(F.flatMap(value) {
case Left(a) => fa(a).value
case Right(a) => fb(a).value
Expand Down