-
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 Expr.ofFunction1 #14138
Add Expr.ofFunction1 #14138
Conversation
Co-authored-by: Dale Wijnand <[email protected]>
I think we should mark this as |
* to an expression equivalent to | ||
* `'{ $a => $r }` typed as an `Expr[A => R]` | ||
*/ | ||
def ofFunction1[A, R](f: Expr[A] => Expr[R])(using Type[R], Type[A])(using Quotes): Expr[A => R] = |
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.
If we add this we should add it for all function arities. It seems that we would need TupledFunction
(see #10416) to be able to write this interface for all function sizes.
* Transforms the expression | ||
* `a => r` where `a: Expr[A]` and `r: Expr[R]` | ||
* to an expression equivalent to | ||
* `'{ $a => $r }` typed as an `Expr[A => R]` |
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.
As you're adding a new method to stdlib's API you should mark it as@experimental
No description provided.