修改错误的标点
This commit is contained in:
@ -829,7 +829,7 @@ hasAnyMatches(numbers, lessThanTen)
|
||||
})
|
||||
</code></pre>
|
||||
<blockquote>
|
||||
<p>练习:<br>重写闭包,对所有奇数返回 0.</p>
|
||||
<p>练习:<br>重写闭包,对所有奇数返回0。</p>
|
||||
</blockquote>
|
||||
<p>有很多种创建闭包的方法。如果一个闭包的类型已知,比如作为一个回调函数,你可以忽略参数的类型和返回值。单个语句闭包会把它语句的值当做结果返回。</p>
|
||||
<pre><code class="lang-swift">numbers.map({ number in 3 * number })
|
||||
|
||||
Reference in New Issue
Block a user