From ff22c1455d228121178dcdca57faec85799e1f13 Mon Sep 17 00:00:00 2001 From: Zhao Jian Date: Tue, 26 May 2015 17:49:39 +0800 Subject: [PATCH 1/2] Update 07_Closures.md --- source/chapter2/07_Closures.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter2/07_Closures.md b/source/chapter2/07_Closures.md index d9bfea2c..093a113d 100755 --- a/source/chapter2/07_Closures.md +++ b/source/chapter2/07_Closures.md @@ -225,7 +225,7 @@ let numbers = [16, 58, 510] 同时定义了一个准备转换为字符串的整型数组。 您现在可以通过传递一个尾随闭包给`numbers`的`map`方法来创建对应的字符串版本数组。 -需要注意的时调用`numbers.map`不需要在`map`后面包含任何括号,因为其只需要传递闭包表达式这一个参数,并且该闭包表达式参数通过尾随方式进行撰写: +需要注意的是调用`numbers.map`不需要在`map`后面包含任何括号,因为其只需要传递闭包表达式这一个参数,并且该闭包表达式参数通过尾随方式进行撰写: ```swift let strings = numbers.map { From fb03b936328334b502b73757c9f8c8d6c71a4a44 Mon Sep 17 00:00:00 2001 From: Xwoder Date: Fri, 29 May 2015 01:16:47 +0800 Subject: [PATCH 2/2] Update 13_Inheritance.md --- source/chapter2/13_Inheritance.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter2/13_Inheritance.md b/source/chapter2/13_Inheritance.md index c855327b..3ab4e7a4 100755 --- a/source/chapter2/13_Inheritance.md +++ b/source/chapter2/13_Inheritance.md @@ -226,7 +226,7 @@ println("AutomaticCar: \(automatic.description)") ## 防止重写 -你可以通过把方法,属性或下标脚本标记为*`final`*来防止它们被重写,只需要在声明关键字前加上`@final`特性即可。(例如:`final var`, `final func`, `final class func`, 以及 `final subscript`) +你可以通过把方法,属性或下标脚本标记为*`final`*来防止它们被重写,只需要在声明关键字前加上`final`特性即可。(例如:`final var`, `final func`, `final class func`, 以及 `final subscript`) 如果你重写了`final`方法,属性或下标脚本,在编译时会报错。在扩展中,你添加到类里的方法,属性或下标脚本也可以在扩展的定义里标记为 final。