You can currently achieve the same result if you remove `[inout a]` since
`var`s are captured by reference.

On Wed, Oct 5, 2016 at 9:06 PM, Cao Jiannan via swift-evolution <
[email protected]> wrote:

> for example:
>
> var a = 1
>
> let block = { [inout a] in
>         a += 1
> }
>
> block()
> block()
>
> print(a) // 3
>
>
> _______________________________________________
> swift-evolution mailing list
> [email protected]
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to