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

Lambda syntax #165

Open
PaulBone opened this issue May 10, 2019 · 2 comments
Open

Lambda syntax #165

PaulBone opened this issue May 10, 2019 · 2 comments
Labels
component: compiler Concerning the compiler meta: aoc2021 Issues encoutered during Advent of Code 2021 meta: triaged Has the issue been triaged yet? skill: mercury status: accepted A bug we intend to fix it. type: enhancement

Comments

@PaulBone
Copy link
Member

PaulBone commented May 10, 2019

Decide on the syntax for lambdas and implement it in the compiler front-end & docs.

Implement lambda expressions and partial application, including of higher order terms.

Lambda expressions should look like

func(x, y) { return x + y }

Or with a shorthand when the body is a single expression.

func(x, y) => x + y

Type declarations arn't shown here, they won't normally be used, but probably will be in the initial version.

@PaulBone PaulBone added type: enhancement skill: mercury component: compiler Concerning the compiler meta: triaged Has the issue been triaged yet? status: accepted A bug we intend to fix it. labels May 10, 2019
@Gertm
Copy link
Contributor

Gertm commented May 11, 2019

Is this a discussion on how the lambda syntax needs to look? Or is it you implementing it?

@PaulBone
Copy link
Member Author

This is for the implementation. But discussion is welcome.

@PaulBone PaulBone added the meta: aoc2021 Issues encoutered during Advent of Code 2021 label Dec 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: compiler Concerning the compiler meta: aoc2021 Issues encoutered during Advent of Code 2021 meta: triaged Has the issue been triaged yet? skill: mercury status: accepted A bug we intend to fix it. type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants