Skip to content

Commit 45701e0

Browse files
committed
Merge pull request #358 from zhang3xing1/patch-1
Update 06_Functions.md
2 parents 9261664 + 8c1d166 commit 45701e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/chapter2/06_Functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ func chooseStepFunction(backwards: Bool) -> (Int) -> Int {
562562
return backwards ? stepBackward : stepForward
563563
}
564564
var currentValue = -4
565-
let moveNearerToZero = chooseStepFunction(currentValue < 0)
565+
let moveNearerToZero = chooseStepFunction(currentValue > 0)
566566
// moveNearerToZero now refers to the nested stepForward() function
567567
while currentValue != 0 {
568568
println("\(currentValue)... ")

0 commit comments

Comments
 (0)