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
Was this helpful?
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
Was this helpful?