Created
February 18, 2015 00:04
-
-
Save josephlord/4522b10ec7bd087d55be to your computer and use it in GitHub Desktop.
As much 1.2 only Swift as you can fit on a slide
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
| class Swift_1_2 { | |
| static var v = UIView() | |
| static let d = [ "a" : 1, "b" : 3 ] | |
| static func bar() { | |
| let x: Set<Int> | |
| if let a = d["a"], b = d["b"] where a < b { | |
| x = [a, b, b-a] | |
| } else { | |
| x = [] | |
| } | |
| (v as! UILabel).text = "Set: \(x)" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment