diff --git a/chapter1/GuidedTour.playground.zip b/chapter1/GuidedTour.playground.zip new file mode 100644 index 00000000..13e2c05e Binary files /dev/null and b/chapter1/GuidedTour.playground.zip differ diff --git a/source/chapter1/02_a_swift_tour.md b/source/chapter1/02_a_swift_tour.md index 033f93c1..f4318737 100755 --- a/source/chapter1/02_a_swift_tour.md +++ b/source/chapter1/02_a_swift_tour.md @@ -27,6 +27,7 @@ println("Hello, world") > 注意: > 为了获得最好的体验,在 Xcode 当中使用代码预览功能。代码预览功能可以让你编辑代码并实时看到运行结果。 +> 打开Playground ## 简单值 @@ -314,7 +315,7 @@ numbers.map({ ``` > 练习: -> 重写闭包,对所有奇数返回 0. +> 重写闭包,对所有奇数返回0。 有很多种创建闭包的方法。如果一个闭包的类型已知,比如作为一个回调函数,你可以忽略参数的类型和返回值。单个语句闭包会把它语句的值当做结果返回。 diff --git a/source/chapter1/GuidedTour.playground.zip b/source/chapter1/GuidedTour.playground.zip new file mode 100644 index 00000000..13e2c05e Binary files /dev/null and b/source/chapter1/GuidedTour.playground.zip differ