func x(x:Int, y:Int)->(Int, Int){ let a = x+y let b = x-y return (a, b) } let (a, b) = x(10, y: 3) print(a = (a)) let val = x(10, y: 3) print(val = (val.0))
func x(x:Int, y:Int=10)->(Int, Int){ let a = x+y let b = x-y return (a, b) } x(10) x(10, y: 3)
z(y, x: 10, y: 7) func x(x:Int, y:Int)->(Int, Int){ let a = x+y let b = x-y return (a, b) } func z(fx:(Int, Int)->(Int,Int), x:Int, y:Int){ let x = fx(x, y).0; print(x = (x)) }
func change(inout m:Int){ m = 10; } var xx = 2; change(&xx) print(xx = (xx))