I know this question has been asked before, but the older answers were for Swift 1. Is it possible to iterate through all the possible values of an enum type in Swift 2?
The goal is to have something like:
enum Foo {
case Bar
case Baz
case Quux
}
for value in MYSTERY_OPERATION(Foo) {
print(value)
}
print:
Bar
Baz
Quux