|
12 | 12 | > _ClosureParam_ :\ |
13 | 13 | > [_OuterAttribute_]<sup>\*</sup> [_Pattern_] ( `:` [_Type_] )<sup>?</sup> |
14 | 14 |
|
15 | | -A _closure expression_ defines a closure and denotes it as a value, in a single |
16 | | -expression. A closure expression is a pipe-symbol-delimited (`|`) list of |
17 | | -irrefutable [patterns] followed by an expression. Type annotations may optionally be added |
18 | | -for the type of the parameters or for the return type. If there is a return |
19 | | -type, the expression used for the body of the closure must be a normal |
20 | | -[block]. A closure expression also may begin with the |
21 | | -`move` keyword before the initial `|`. |
| 15 | +A _closure expression_, also know as a lambda expression or a lambda, defines a |
| 16 | +closure and denotes it as a value, in a single expression. A closure expression |
| 17 | +is a pipe-symbol-delimited (`|`) list of irrefutable [patterns] followed by an |
| 18 | +expression. Type annotations may optionally be added for the type of the |
| 19 | +parameters or for the return type. If there is a return type, the expression |
| 20 | +used for the body of the closure must be a normal [block]. A closure expression |
| 21 | +also may begin with the `move` keyword before the initial `|`. |
22 | 22 |
|
23 | 23 | A closure expression denotes a function that maps a list of parameters onto |
24 | 24 | the expression that follows the parameters. Just like a [`let` binding], the |
@@ -83,4 +83,4 @@ Attributes on closure parameters follow the same rules and restrictions as |
83 | 83 | [_Pattern_]: ../patterns.md |
84 | 84 | [_Type_]: ../types.md#type-expressions |
85 | 85 | [`let` binding]: ../statements.md#let-statements |
86 | | -[_OuterAttribute_]: ../attributes.md |
| 86 | +[_OuterAttribute_]: ../attributes.md |
0 commit comments