365行少个f

This commit is contained in:
baocaixiong
2014-06-03 22:49:26 +08:00
parent 33bff42d88
commit c4f54928e1

View File

@ -326,7 +326,7 @@ secondForLoop
</code></pre><p>使用<code>..</code>创建的范围不包含上界,如果想包含的话需要使用<code>...</code></p>
<h2 id="-">函数和闭包</h2>
<p>使用<code>func</code>来声明一个函数,使用名字和参数来调用函数。使用<code>-&gt;</code>来指定函数返回值。</p>
<pre><code>unc greet(name: String, day: String) -&gt; String {
<pre><code>func greet(name: String, day: String) -&gt; String {
return &quot;Hello \(name), today is \(day).&quot;
}
greet(&quot;Bob&quot;, &quot;Tuesday&quot;)