-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Introduce Tuple.ReverseOnto
and use it in Tuple.reverse
#19183
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
Introduce Tuple.ReverseOnto
and use it in Tuple.reverse
#19183
Conversation
library/src/scala/Tuple.scala
Outdated
type ReverseImpl[Acc <: Tuple, X <: Tuple] <: Tuple = X match | ||
case x *: xs => ReverseImpl[x *: Acc, xs] | ||
case EmptyTuple => Acc | ||
type ReverseOnto[From <: Tuple, To <: Tuple] <: Tuple = From match |
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.
Should To
be covariant? As with Concat
.
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.
@sjrd do you have an opinion or suggestion on this?
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.
Mimic Concat
would be my advice.
41238f4
to
1dda4b3
Compare
1dda4b3
to
12e7c9e
Compare
These definition was updated in scala#19183. This does not leave much time to test before the release of 3.4. As a precaution we must delay it to 3.5.
These definition was updated in #19183. This does not leave much time to test before the release of 3.4. As a precaution we must delay it to 3.5.
No description provided.