-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add experimental TupledFunction #14414
Add experimental TupledFunction #14414
Conversation
2ddc6dd
to
0b91d4e
Compare
4542aef
to
bcc5474
Compare
We should also revisit #14138 once this is merged. |
f0dd2f5
to
64cee08
Compare
Does this generalize to polymorphic functions? Ie. given |
My intuition tells me it is possible. The interface has nothing that depends on normal lambdas. The compiler should be able to synthesize @milessabin do you have a concrete where this would be useful? |
This reverts commit f4e1ca4. Also makes TupledFunction experimental
64cee08
to
4b0906d
Compare
@nicolasstucki yes, I do ... various higher-kinded transformations. But also, more generally, it'd be good to keep parity between monomorphic and polymorphic functions wherever possible. |
@milessabin could you share a couple of representative examples to include in tests? |
We should probably start with the non-polymorphic version and extend it later. I do not have time right now to implement the extension. If we have the current version as experimental library authors could start experimenting with it and provide feedback. |
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.
Are dependent functions supported? e.g. (x: Int, y: Int) => List[x.type]
Not sure. I would have to double-check and possibly improve later. That would mean the tupled version of the function is |
This reverts commit f4e1ca4.
Originally added in #6568.