-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Additional methods for Bitraverse #2474
Comments
Has |
Yeah seems like a good addition to me 👍 |
I've looked into it briefly and def flatTraverse[G[_], A, B](fa: F[A])(f: A => G[F[B]])(implicit G: Applicative[G], F: FlatMap[F]): G[F[B]] we would need a totally new def biflatTraverse[G[_], A, B, C, D](
fa: F[A, B]
)(f: A => G[F[C, D]], g: B => G[F[C, D]])(implicit G: Applicative[G], F: BiflatMap[F]): G[F[C, D]] =
G.map(bitraverse(fa)(f, g))(F.biflatten)
...
trait BiflatMap[F[_, _]] extends Bifunctor[F] {
def biflatten[A, B](ffa: F[F[A, B], F[A, B]]): F[A, B]
} Would you accept a PR with |
What do you think about adding any/all of the following functions to
Bitraverse
? IMHOleftTraverse
andleftSequence
would be most useful.The code above is only a draft, might not compile.
The text was updated successfully, but these errors were encountered: