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

Syntax: $ operator #28

Open
alcides opened this issue Mar 2, 2024 · 0 comments
Open

Syntax: $ operator #28

alcides opened this issue Mar 2, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alcides
Copy link
Owner

alcides commented Mar 2, 2024

Haskell supports f $ g a as a shorthand for f (g a).

The way this can be implemented is adding to the syntax the $ operator with the right precedence.

In Haskell, $ has the following type:

($) :: (a -> b) -> a -> b

So this depends on Polymorphism.

@alcides alcides added the good first issue Good for newcomers label Mar 2, 2024
@alcides alcides changed the title $ operator. $ operator Mar 2, 2024
@alcides alcides added enhancement New feature or request help wanted Extra attention is needed labels Mar 2, 2024
@alcides alcides changed the title $ operator Syntax: $ operator Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant