-
-
Save cipolleschi/40daf777b7633a5058515472cdc415f9 to your computer and use it in GitHub Desktop.
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
| enum ShippingOperation { | |
| case nextDay | |
| case secondDay | |
| case priority | |
| case standard | |
| } | |
| typealias ShippingOperationSet = Set<ShippingOperation> | |
| extension ShippingOperationSet { | |
| static var express: ShippingOperationSet { [.nextDay, .secondDay]} | |
| static var all: ShippingOperationSet { return ShippingOperationSet.express.union([.priority, .standard]) } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment