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

Support for anonymous function #18

Open
danilhendrasr opened this issue Jul 30, 2021 · 0 comments
Open

Support for anonymous function #18

danilhendrasr opened this issue Jul 30, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@danilhendrasr
Copy link
Owner

Yalija's function declaration syntax performs two independent operations. It creates a function and also binds it to a name. This improves usability for the common case where we do want to associate a name with the function. But in functional-styled code, we often want to create a function to immediately pass it to some other function or return it. In that case, it doesn’t need a name.

Languages that encourage a functional style usually support anonymous functions or lambdas—an expression syntax that creates a function without binding it to a name. Maybe yalija should implement it too.

@danilhendrasr danilhendrasr added the enhancement New feature or request label Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant