Consider the following Swift code.
var a = [(1, 1)] if contains(a, (1, 2)) { println(\"Yes\") }
All I need is to check if a
a
Swift 4
Change your code to:
var a = [(1, 1)] if a.contains(where: { $0 == (1, 2) } ) { print("Yes") }