Pattern matching with "switch"