-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Implement Tuple.FlatMap #13245
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
Implement Tuple.FlatMap #13245
Conversation
You also need to update the |
* The result is typed as `Concat[F[A1], ...Concat[F[An], EmptyTuple]...])` if the tuple type is fully known. | ||
*/ | ||
@experimental | ||
inline def flatMap[This >: this.type <: Tuple, F[_] <: Tuple](f: [t] => t => F[t]): FlatMap[This, F] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This signature is not ideal as we need to pass the tuple type when we call. This should always be inferred.
Maybe we should wait until we can do something like
inline def flatMap[F[_] <: Tuple][This >: this.type <: Tuple](f: [t] => t => F[t]): FlatMap[This, F] =
I will close this PR for now. We should revisit it in the future as the implementation is there but we still lack the ability to write the correct signature. |
closes #13163