startThread( closure: () -> Void )
var a = [2, 3, 5, 7] a[2] = 4 startThread { a[3] = 8 }
func startThread(f: @escaping () -> Void) { f() } func main() { var a = [2, 3, 5] a[0] = 88 startThread { a[1] = 99 } print(a) // [88, 99, 5] } main()