PlasmaLang / plasma

Plasma Programming Language
Other
162 stars 11 forks source link

Lambda syntax #165

Open PaulBone opened 5 years ago

PaulBone commented 5 years ago

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.

Gertm commented 5 years ago

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

PaulBone commented 5 years ago

This is for the implementation. But discussion is welcome.