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

Currying #27

Open
Victorious3 opened this issue Jul 5, 2023 · 0 comments
Open

Currying #27

Victorious3 opened this issue Jul 5, 2023 · 0 comments
Labels
proposal New feature or request

Comments

@Victorious3
Copy link
Contributor

Once we have lambda functions, currying can be achieved using those.
It might be convenient to create an extra operator to generate curried functions.

def some_function(a: int, b: int)
let curried = some_function(-, 20)
// essentially the same as
let curried2 = (a: int) -> some_function(a, 20)
curried(10)

Only positional arguments are allowed in this case.

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

No branches or pull requests

1 participant