Open DavePearce opened 4 years ago
Currently, lambda's only support expression syntax, such as follows:
return &(int x -> x + 1)
However, it would be good on occasion to support some form of statement synax. Here's one possibility:
int x = &(int y): return y + 1
This offers the closest syntax to existing function and method declarations. Another option would be to exploit the semi-colon to help. For example:
function
method
return &(int x -> x = x + 1; return x)
Currently, lambda's only support expression syntax, such as follows:
However, it would be good on occasion to support some form of statement synax. Here's one possibility:
This offers the closest syntax to existing
function
andmethod
declarations. Another option would be to exploit the semi-colon to help. For example: