Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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