fixed typo

This commit is contained in:
Carol Hsu
2014-07-23 19:29:02 +08:00
parent a920bf6d0e
commit fb385813cf

View File

@ -558,7 +558,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)... ")