Skip to content

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

Closed
wants to merge 2 commits into from
Closed

Conversation

KacperFKorban
Copy link
Member

closes #13163

@nicolasstucki
Copy link
Contributor

You also need to update the MiMaFilters. You can run scala3-interfaces/mimaReportBinaryIssues to get the required list of excludes.

@dwijnand dwijnand added the needs-minor-release This PR cannot be merged until the next minor release label Aug 3, 2021
@dwijnand dwijnand requested a review from nicolasstucki August 19, 2021 07:44
@dwijnand dwijnand added this to the 3.1.0 milestone Aug 23, 2021
@nicolasstucki nicolasstucki removed this from the 3.1.0 milestone Aug 23, 2021
* 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] =
Copy link
Contributor

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] =

@nicolasstucki
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-minor-release This PR cannot be merged until the next minor release stat:revisit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing scala.Tuple.flatMap
3 participants