We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9261664 + 8c1d166 commit 45701e0Copy full SHA for 45701e0
source/chapter2/06_Functions.md
@@ -562,7 +562,7 @@ func chooseStepFunction(backwards: Bool) -> (Int) -> Int {
562
return backwards ? stepBackward : stepForward
563
}
564
var currentValue = -4
565
-let moveNearerToZero = chooseStepFunction(currentValue < 0)
+let moveNearerToZero = chooseStepFunction(currentValue > 0)
566
// moveNearerToZero now refers to the nested stepForward() function
567
while currentValue != 0 {
568
println("\(currentValue)... ")
0 commit comments