From 00ef4e6c14d625bfa36d7653366393ea98ab4f27 Mon Sep 17 00:00:00 2001 From: huangqiaobo Date: Fri, 5 Sep 2014 18:52:54 +0800 Subject: [PATCH] fix some typos --- source/chapter1/02_a_swift_tour.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/chapter1/02_a_swift_tour.md b/source/chapter1/02_a_swift_tour.md index 622c3a5b..3103c659 100755 --- a/source/chapter1/02_a_swift_tour.md +++ b/source/chapter1/02_a_swift_tour.md @@ -682,10 +682,10 @@ protocolValue.simpleDescription 在尖括号里写一个名字来创建一个泛型函数或者类型。 ```swift -func repeat(item: ItemType, times: Int) -> ItemType[] { - var result = ItemType[]() - for i in 0..times { - result += item +func repeat(item: ItemType, times: Int) -> [ItemType] { + var result = [ItemType]() + for i in 0..