Closures with shared state

Run Settings
LanguageSwift
Language Version
Run Command
func main() { var a = 1 func inca() { a += 1 } func outa() { print(a) } outa() inca() outa() } main()
Editor Settings
Theme
Key bindings
Full width
Lines