add highlight
This commit is contained in:
@ -46,7 +46,7 @@
|
||||
|
||||
|
||||
|
||||
<div class="book" data-level="1.2" data-basepath=".." data-revision="1402556298428">
|
||||
<div class="book" data-level="1.2" data-basepath=".." data-revision="1402565541342">
|
||||
<div class="book-header">
|
||||
<!-- Actions Left -->
|
||||
<a href="#" class="btn pull-left toggle-summary" aria-label="Toggle summary"><i class="fa fa-align-justify"></i></a>
|
||||
@ -491,7 +491,7 @@
|
||||
<a href="http://www.gitbook.io/" target="blank" class="gitbook-link">Generated using GitBook</a>
|
||||
</li>
|
||||
<li style="margin-left:15%;"> <iframe src="http://ghbtns.com/github-btn.html?user=numbbbbb&repo=the-swift-programming-language-in-chinese&type=watch&count=true&size=large"
|
||||
allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe></li>
|
||||
allowtransparency="true" frameborder="0" scrolling="0" width="170" height="30"></iframe></li><li><p style="padding-left:5px;padding-right:5px;">翻译无任何商业目的,仅供内部学习交流使用!</p></li><li><script src="http://s19.cnzz.com/z_stat.php?id=1000480711&web_id=1000480711" language="JavaScript"></script></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@ -587,7 +587,7 @@
|
||||
|
||||
<div class="page-inner">
|
||||
|
||||
<section class="normal" id="section-gitbook_118">
|
||||
<section class="normal" id="section-gitbook_6">
|
||||
|
||||
<blockquote>
|
||||
<p>翻译:numbbbbb
|
||||
@ -822,7 +822,8 @@ hasAnyMatches(numbers, lessThanTen)
|
||||
<p>重写闭包,对所有奇数返回 0.</p>
|
||||
</blockquote>
|
||||
<p>有很多种创建闭包的方法。如果一个闭包的类型已知,比如作为一个回调函数,你可以忽略参数的类型和返回值。单个语句闭包会把它语句的值当做结果返回。</p>
|
||||
<p>你可以通过参数位置而不是参数名字来引用参数——这个方法在非常短的闭包中非常有用。当一个闭包作为最后一个参数传给一个函数的时候,它可以直接跟在括号后面。</p>
|
||||
<pre><code>numbers.map({ number in 3 * number })
|
||||
</code></pre><p>你可以通过参数位置而不是参数名字来引用参数——这个方法在非常短的闭包中非常有用。当一个闭包作为最后一个参数传给一个函数的时候,它可以直接跟在括号后面。</p>
|
||||
<pre><code>sort([1, 5, 3, 12, 2]) { $0 > $1 }
|
||||
</code></pre><p><a name="objects_and_classes"></a></p>
|
||||
<h2 id="-">对象和类</h2>
|
||||
@ -1178,6 +1179,6 @@ require(["gitbook"], function(gitbook) {
|
||||
</script>
|
||||
|
||||
|
||||
<script src="http://s19.cnzz.com/z_stat.php?id=1000480711&web_id=1000480711" language="JavaScript"></script></body>
|
||||
<script src="http://yandex.st/highlightjs/8.0/styles/default.min.css"></script><script src="http://yandex.st/highlightjs/8.0/highlight.min.js"></script><script text="javascript">$('pre code').each(function(i, block) {hljs.highlightBlock(block);});</script></body>
|
||||
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user