Skip to content
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

Create a generic Apply function which applies any parameters and returns a function requring the discarded parameters. #702

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FreeApophis
Copy link
Member

No description provided.

@bash bash mentioned this pull request May 17, 2023
@FreeApophis
Copy link
Member Author

FreeApophis commented May 17, 2023

We introduce the Discard syntax in #728, but leave Apply for now.
If C# improves the type inference of MethodGroups so we could use Apply on Functions directly, we will reconsider to add Apply.

@FreeApophis FreeApophis changed the title Introducing Discard and using it to make a generic Apply function. Create a generic Apply function which applies paramters in any order. May 17, 2023
@FreeApophis
Copy link
Member Author

The Apply functions probably should be generated by a Source Generator, because there are so many overloads. Even just 3 Parameters give 6 overloads.

@FreeApophis FreeApophis force-pushed the experiment-discard-apply branch from 5646ec6 to 856050e Compare May 17, 2023 09:46
@FreeApophis FreeApophis changed the title Create a generic Apply function which applies paramters in any order. Create a generic Apply function which applies paramters any parameters and returns a function requring the discarded parameters. May 17, 2023
@FreeApophis FreeApophis changed the title Create a generic Apply function which applies paramters any parameters and returns a function requring the discarded parameters. Create a generic Apply function which applies any parameters and returns a function requring the discarded parameters. May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant