3 ms·Swift has "if case let" for that use case. (Admittedly, the syntax is a bit esoteric.)by austinz 10y agoSwift has "if case let" for that use case. (Admittedly, the syntax is a bit esoteric.)