Pattern matching in Enum
While working using The Composable Architecture I often need to match a specific enum action or dealing with extracting associated value in enum. There’s a few different way to pattern matching an enum and extract its associated value:
- Using if case let to match specific enum case
- Using guard case let syntax
- [[ Use CasePath ]]