where : 用于条件判断
let point = (1, -1)
switch point {
case let (x, y) where x == y:
print("x == y")
case let (x, y) where x > y:
print("x > y")
case let (x, y) where x < y:
print("x < y")
where : 用于条件判断
let point = (1, -1)
switch point {
case let (x, y) where x == y:
print("x == y")
case let (x, y) where x > y:
print("x > y")
case let (x, y) where x < y:
print("x < y")