Implementing if without using if in Swift.