From 8f6eb4e2f6df46c44fdb69e7fe35716c395b5359 Mon Sep 17 00:00:00 2001 From: ray16897188 Date: Mon, 29 Jun 2015 13:05:40 +0800 Subject: [PATCH] patterns_13:05_06/29/2015_Preliminary --- source/chapter3/07_Patterns.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/chapter3/07_Patterns.md b/source/chapter3/07_Patterns.md index 0795f26f..0b4f0bf5 100755 --- a/source/chapter3/07_Patterns.md +++ b/source/chapter3/07_Patterns.md @@ -1,4 +1,4 @@ -> 翻译:[honghaoz](https://github.com/honghaoz) +> 翻译:[honghaoz](https://github.com/honghaoz), [ray16897188](https://github.com/ray16897188) > 校对:[numbbbbb](https://github.com/numbbbbb), [stanzhai](https://github.com/stanzhai) # 模式(Patterns) @@ -144,8 +144,7 @@ if case let x? = someOptional { print(x) } ``` - -可选模式在`for-in`语句提供了在一个元素是可选类型的数组中迭代的简便方式,只为数组中的非空`non-nil`元素执行循环。 +如果一个数组的元素是可选类型,可选模式为`for-in`语句提供了在该数组中迭代的简便方式,只为数组中的非空`non-nil`元素执行循环。 ```swift let arrayOfOptionalInts: [Int?] = [nil, 2, 3, nil, 5]