title: swift calculator operation in a switch case
body: <p>i am new in programming swift.i have made this code by following other tutorials but i can´t find the correct write typ to perform operation?</p>
  
  <pre><code>@IBAction func operation(_ sender: UIButton) {
      let operate = sender.currentTitle!
      switch operate {
      case "+" : performOperation() {}
      case "-" : performOperation() {}
      case "*" : performOperation() {}
      case "/" : performOperation() {}
      default: break
      }
  
  }
  
  func performOperation(operate: (Double, Double) -&gt; Double) {
      }
  </code></pre>