Destructuring

var tuple = ("Text", 10)
func foo(a:String, b:Int) {}

// โญ๏ธ tuple splat syntax
foo(tuple)            // โŒ deprecated in Swift 2.2



// โญ๏ธ array.map()
[(1,2)].map(max)      // โœ… [2]

Last updated