From 8c1d1665325e6f9a3811a201083b4e40db11d546 Mon Sep 17 00:00:00 2001 From: zhang3xing1 Date: Wed, 13 May 2015 16:03:54 +0800 Subject: [PATCH] Update 06_Functions.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 应更正为 >, 否则会死循环 --- source/chapter2/06_Functions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/chapter2/06_Functions.md b/source/chapter2/06_Functions.md index 78cdc8f1..87d22485 100755 --- a/source/chapter2/06_Functions.md +++ b/source/chapter2/06_Functions.md @@ -562,7 +562,7 @@ func chooseStepFunction(backwards: Bool) -> (Int) -> Int { return backwards ? stepBackward : stepForward } var currentValue = -4 -let moveNearerToZero = chooseStepFunction(currentValue < 0) +let moveNearerToZero = chooseStepFunction(currentValue > 0) // moveNearerToZero now refers to the nested stepForward() function while currentValue != 0 { println("\(currentValue)... ")