Skip to content

Commit 3b8f0d3

Browse files
authored
Merge pull request #731 from hman523/mention_lambda
Added clearification that closures are refered to lambdas
2 parents 24137b4 + 19c718b commit 3b8f0d3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/expressions/closure-expr.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
> _ClosureParam_ :\
1313
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> [_Pattern_]&nbsp;( `:` [_Type_] )<sup>?</sup>
1414
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 `|`.
2222

2323
A closure expression denotes a function that maps a list of parameters onto
2424
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
8383
[_Pattern_]: ../patterns.md
8484
[_Type_]: ../types.md#type-expressions
8585
[`let` binding]: ../statements.md#let-statements
86-
[_OuterAttribute_]: ../attributes.md
86+
[_OuterAttribute_]: ../attributes.md

0 commit comments

Comments
 (0)