Partial function applications #7002
Unanswered
fedeAlterio
asked this question in
Language Ideas
Replies: 1 comment 2 replies
-
You don't have to write types if they are not ambiguous with natural lambda types like var plus2 = x => AddInts(2, x) // Func<int, int> inferred But there is no syntax to make lambdas even shorter like var plus2 = AddInts(2, _) // I'm not sure something like this will ever get to the language |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's suppouse to have a function like that
What I would like to do is write something like
So basically we need to write the types for all the unspecified parameters. The overload resolution in that way is possible.
With type inference, we could also write something like
Also it could be used of course directly like
Also it should work with optional parameters and delegates
Beta Was this translation helpful? Give feedback.
All reactions