From 1b772fb16e097f5409d4ef155300a23d2e8b34ae Mon Sep 17 00:00:00 2001 From: chenmingjia <564575471@qq.com> Date: Mon, 12 Sep 2016 19:51:30 +0800 Subject: [PATCH] [Translate] Translate Generic in Swift 3.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Swift 3.0 Generic 已经补充完毕,主要是 Generic Where Clauses 部分的更新 --- source/chapter2/23_Generics.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/chapter2/23_Generics.md b/source/chapter2/23_Generics.md index 3956a19b..03633c0b 100644 --- a/source/chapter2/23_Generics.md +++ b/source/chapter2/23_Generics.md @@ -470,19 +470,19 @@ func allItemsMatch (_ someContainer: C1, _ anotherContainer: C2) -> Bool where C1.ItemType == C2.ItemType, C1.ItemType: Equatable { - // Check that both containers contain the same number of items. + // 检查两个容器含有相同数量的元素 if someContainer.count != anotherContainer.count { return false } - // Check each pair of items to see if they are equivalent. + // 检查每一对元素是否相等 for i in 0..