Last active
November 19, 2015 19:55
-
-
Save cbess/27143b7211ed395f2d61 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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