圣诞版本在方法嵌套章节的Demo有问题
codergelly opened this issue · comments
在方法嵌套章节里面的最后一个Demo,返回值是多了一个 ( ,在闭包里面的函数 inout应该在Int前面吧?
Demo:
func makeIncrementor(addNumber: Int) -> (inout Int) -> Void {
func incrementor( variable: inout Int) -> Void {
variable += addNumber;
}
return incrementor;
}