Swift 2: Control Flow Pattern Matching Examples 23 Sep 2015 This article aims to provide examples of the expanded pattern matching support which ships with Swift 2. Pattern matching using if and guard New in Swift 2 is support for pattern matching within if statements (and guard statements). Let’s first define a simple enum: // A generic 'number' type that can represent either an integer, a // flo