Skip to content

Instantly share code, notes, and snippets.

@cbess
Last active November 19, 2015 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbess/27143b7211ed395f2d61 to your computer and use it in GitHub Desktop.
Save cbess/27143b7211ed395f2d61 to your computer and use it in GitHub Desktop.
var goodResult = ...
switch goodResult {
case let .Success(valueHere):
print("\(valueHere)")
default:
break
}
func myFunc() {
guard case let .Success(result) = goodResult else {
return
}
print("Value: \(result)")
}
myFunc()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment