     
     private func executePendingBinaryOperation() {
         if pending != nil {
+            rememberPending = pendingBinaryOperationInfo(binaryFunction : pending!.binaryFunction, firstOperand : accumulator)
             accumulator = pending!.binaryFunction(pending!.firstOperand,accumulator)
             pending = nil
         }

            switch operation {
            case .Constant(let value) :
                accumulator = value
            case .UnariOperation(let function) :
                accumulator = function(accumulator)
            case .BinaryOperation(let function) :
                executePendingBinaryOperation()
                pending = pendingBinaryOperationInfo(binaryFunction: function,firstOperand: accumulator)
            case .Equals :
                executePendingBinaryOperation()
            case .Delete :
                accumulator = 0.0
                pending = nil
            }
        }
    }
    
    var result : Double {

//

import Foundation

class CalculatorBrain {
    
