Created
June 21, 2016 00:30
-
-
Save KingOfBrian/d112d702aa0b0865831a762340839b0f to your computer and use it in GitHub Desktop.
This file contains 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
let strA: String? = check ? "hrm" : nil | |
print(strA) // .None | |
let str: String = "hrm" | |
let strB: String? = check ? str : nil | |
print(strB) // .Some("Awesome Idea.") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment