@IBAction func operate(sender: UIButton) {
let operation = sender.currentTitle
if userIsInTheMiddleOfTypingANumber {
enter()
}
switch operation {
case "×": performOperation(test)
case "÷": performOperation { $0 / $1 }
case "+": performOperation { $0 + $1 }
case "−": performOperation { $0 - $1 }
default: break
}
}