Created
January 30, 2018 19:38
-
-
Save rizumita/ae3d48c2c647f8c88b27155d816c9e57 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
var i: Character? | |
test("Optional Binding") { | |
for _ in 0...repeatCount { | |
if let us = s { | |
i = us.first | |
} else { | |
i = "i".first | |
} | |
} | |
} | |
print(String(describing: i)) | |
var j: Character? | |
test("??") { | |
for _ in 0...repeatCount { | |
j = (s ?? "j").first | |
} | |
} | |
print(String(describing: j)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment