mirror of
https://github.com/rust-lang-cn/book-cn.git
synced 2025-01-23 07:20:20 +08:00
Minor grammar fix
This commit is contained in:
parent
2be0bfdeca
commit
72dec3166b
@ -5,8 +5,8 @@
|
||||
### What is a closure
|
||||
|
||||
In programming languages, a closure is a lot like a function. Like a function, closures contain code
|
||||
that is executed when the closure is called. The main difference, besides syntax, from functions is
|
||||
that closures have *capture*. What this means is that closures can use variables in its surrounding
|
||||
that is executed when the closure is called. The main difference, besides syntax, between closures and functions is
|
||||
that closures have *capture*. What this means is that a closure can use variables in its surrounding
|
||||
scope. Consider the following code:
|
||||
|
||||
```rust,ignore
|
||||
|
Loading…
Reference in New Issue
Block a user