import Foundation
let x: String? = nil
let y: String? = "Hello Y"
switch (x,y) {
case (.some(let a), .some(let b)):
print("So \(a) and \(b)")
case (.none, .none):
print("None")
case (.none, .some(let a)):
print("One val \(a)")
default:
print("default")
}
// same can be written as when we need both to be non nil.
switch (x, y) {
case let (a?, b?):
print("So \(a) and \(b)")
default:
print("default")
}