From 38ba1198b7e0348c2fbea9e932a12cdc9ae8b2e6 Mon Sep 17 00:00:00 2001 From: tbchen Date: Fri, 26 Jul 2019 13:05:50 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E7=A4=BA=E4=BE=8B=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=20(#975)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/chapter1/03_a_swift_tour.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/source/chapter1/03_a_swift_tour.md b/source/chapter1/03_a_swift_tour.md index 32897c38..b918ce21 100755 --- a/source/chapter1/03_a_swift_tour.md +++ b/source/chapter1/03_a_swift_tour.md @@ -788,15 +788,16 @@ possibleInteger = .some(100) ```swift func anyCommonElements(_ lhs: T, _ rhs: U) -> Bool - where T.Iterator.Element: Equatable, T.Iterator.Element == U.Iterator.Element { - for lhsItem in lhs { - for rhsItem in rhs { - if lhsItem == rhsItem { - return true - } + where T.Element: Equatable, T.Element == U.Element +{ + for lhsItem in lhs { + for rhsItem in rhs { + if lhsItem == rhsItem { + return true } } - return false + } + return false } anyCommonElements([1, 2, 3], [3]) ```