Last active
November 18, 2018 16:47
-
-
Save daoseng33/6489870613cd04eb15c557d0c86c19a6 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
enum SectionType: Int { | |
case header = 0 | |
case list | |
static let count: Int = { | |
var max: Int = 0 | |
while let _ = SectionType(rawValue: max) { max += 1 } | |
return max | |
}() | |
} | |
print(SectionType.count) // 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment