Skip to content

Commit

Permalink
Merge pull request #731 from hman523/mention_lambda
Browse files Browse the repository at this point in the history
Added clearification that closures are refered to lambdas
  • Loading branch information
Centril authored Dec 18, 2019
2 parents 24137b4 + 19c718b commit 3b8f0d3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/expressions/closure-expr.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
> _ClosureParam_ :\
> &nbsp;&nbsp; [_OuterAttribute_]<sup>\*</sup> [_Pattern_]&nbsp;( `:` [_Type_] )<sup>?</sup>
A _closure expression_ defines a closure and denotes it as a value, in a single
expression. A closure expression is a pipe-symbol-delimited (`|`) list of
irrefutable [patterns] followed by an expression. Type annotations may optionally be added
for the type of the parameters or for the return type. If there is a return
type, the expression used for the body of the closure must be a normal
[block]. A closure expression also may begin with the
`move` keyword before the initial `|`.
A _closure expression_, also know as a lambda expression or a lambda, defines a
closure and denotes it as a value, in a single expression. A closure expression
is a pipe-symbol-delimited (`|`) list of irrefutable [patterns] followed by an
expression. Type annotations may optionally be added for the type of the
parameters or for the return type. If there is a return type, the expression
used for the body of the closure must be a normal [block]. A closure expression
also may begin with the `move` keyword before the initial `|`.

A closure expression denotes a function that maps a list of parameters onto
the expression that follows the parameters. Just like a [`let` binding], the
Expand Down Expand Up @@ -83,4 +83,4 @@ Attributes on closure parameters follow the same rules and restrictions as
[_Pattern_]: ../patterns.md
[_Type_]: ../types.md#type-expressions
[`let` binding]: ../statements.md#let-statements
[_OuterAttribute_]: ../attributes.md
[_OuterAttribute_]: ../attributes.md

0 comments on commit 3b8f0d3

Please sign in to comment.