Open
Description
Add a basic let syntax for simple mathematical functions.
Proposed EBNF:
expr ::= NUMBER
| NAME
| NAME '(' args? ')'
| 'let' NAME+ '=' expr 'in' expr
args = expr (',' expr)*
Where an expression in the form let name = 5 in expr
binds name
to 5
in expr
, and an expression in the form let name a b = a + b in expr
binds name
to the function f(a, b) = a + b
in expr
.