Skip to content

Instantly share code, notes, and snippets.

@SebastianBoldt
Created October 16, 2016 09:50
Show Gist options
  • Save SebastianBoldt/1210e1129701c49d6e7aa86b03664534 to your computer and use it in GitHub Desktop.
Save SebastianBoldt/1210e1129701c49d6e7aa86b03664534 to your computer and use it in GitHub Desktop.
// Won't work
let x: String? = nil
let y: String? = "Hello Optional"
switch (x,y) {
case .some(let a),.some(let b): print("Optional has an value of \(unwrappedX)")
case .none: print("nothing stored inside the enum")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment