-
-
Save cbarrett/23b24a9fe76efdf006df 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
extension Planet { | |
var number: Int { | |
var num = 0 | |
switch self { | |
case .Neptune: | |
num += 1; fallthrough | |
case .Uranus: | |
num +=1; fallthrough | |
case .Saturn: | |
// Etc... | |
} | |
return num | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment