[swift-evolution] [Pitch] inout with capture variable
Cao Jiannan
frogcjn at 163.com
Wed Oct 5 23:06:38 CDT 2016
for example:
var a = 1
let block = { [inout a] in
a += 1
}
block()
block()
print(a) // 3
More information about the swift-evolution
mailing list