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

Built-in function composition operator #254

Open
byorgey opened this issue Oct 8, 2020 · 1 comment
Open

Built-in function composition operator #254

byorgey opened this issue Oct 8, 2020 · 1 comment
Labels
C-Moderate Effort Should take a moderate amount of time to address. S-Nice to have Minor importance U-Language Design U-Standard Library Z-Feature Request Z-Student Good project for a student.

Comments

@byorgey
Copy link
Member

byorgey commented Oct 8, 2020

Eventually, once #136 is addressed, function composition can simply be in a library. However, for now it might be nice to have function composition as a built-in operator.

Note this does create a bit of an issue with disambiguating multiplication and function application. Currently, any application of a binary operator is seen as a "multiplicative term" when it occurs as the left-hand argument to a juxtaposition. That is currently justified since no binary operator can have a function as output. But of course that would not be true anymore if we add a function composition operator. Options include (1) adding an explicit function application operator, (2) subdividing binary operators into two sets, those which can output a function and those which can't, and deciding on multiplication vs application based on that.

@byorgey
Copy link
Member Author

byorgey commented Mar 15, 2022

Note #84 would have a similar issue: now binary operators like + could output a function as well. In that case obviously we could not use option (2), of having two distinct sets of operators that can and can't return a function, since + could do both.

@byorgey byorgey added C-Moderate Effort Should take a moderate amount of time to address. and removed C-Low Hanging Fruit Shouldn't take too much time; ideal issues for new contributors. labels Dec 20, 2023
@byorgey byorgey added the Z-Student Good project for a student. label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Moderate Effort Should take a moderate amount of time to address. S-Nice to have Minor importance U-Language Design U-Standard Library Z-Feature Request Z-Student Good project for a student.
Projects
None yet
Development

No branches or pull requests

1 participant