* Update 14_Initialization.md

* Update 21_Extensions.md

* Update 22_Protocols.md
This commit is contained in:
Hong Duan
2016-08-10 13:23:37 +08:00
committed by 安正超
parent 52151afb7f
commit 20b60b4224
3 changed files with 4 additions and 4 deletions

View File

@@ -297,7 +297,7 @@ func printIntegerKinds(numbers: [Int]) {
print("")
}
printIntegerKinds([3, 19, -27, 0, -6, 0, 7])
// + + - 0 - 0 +
// + + - 0 - 0 +
```
函数 `printIntegerKinds(_:)` 接受一个 `Int` 数组,然后对该数组进行迭代。在每次迭代过程中,对当前整数的计算型属性 `kind` 的值进行评估,并打印出适当的描述。