15 lines
406 B
Markdown
15 lines
406 B
Markdown
# Function Expression
|
|
|
|
A function expression is a value that accepts arguments and returns an expression.
|
|
|
|
```dcdl
|
|
(value: Int) => value + 1
|
|
```
|
|
|
|
See [Functions](../functions.md) for the complete function specification.
|
|
|
|
## Evaluation
|
|
|
|
A function can reference bindings from the lexical scope where it was defined.
|
|
Its body is evaluated when the function is called, not when the function value is created.
|