 fileprivate let greaterThan = comparisonOperator { $0 > 0 }
 fileprivate let greaterThanOrEqualTo = comparisonOperator { $0 >= 0 }
 
-fileprivate let add = binaryOperator(dereferencing({ (operand1, operand2, context) in
+fileprivate let add = binaryOperator(dereferencing: true) { (operand1, operand2, context) in
     let numerableValue1 = operand1.cast(to: .numerable, context: context)
     if numerableValue1 is ErrorableValue {
         return numerableValue1

        return ErrorValue.nan
    }
    return DoubleValue(number: result)
}))

fileprivate let unaryPlus = unaryOperator(dereferencing({ (operand, context) in
    return operand
}))

fileprivate func unaryNegate(_ parameters: [Expression], _ context: EvaluateContext) -> Value {
    if parameters.count != 1 {

internal typealias BinaryEvaluator = (_ operand1: Value, _ operand2: Value, _ context: EvaluateContext) -> Value
fileprivate typealias UnaryEvaluator = (_ operand: Value, _ context: EvaluateContext) -> Value

fileprivate func binaryOperator(dereferencing: Bool, evaluator: @escaping BinaryEvaluator) -> Function {
    return { (parameters, context) in
        if parameters.count != 2 {
            return ErrorValue.invalidArgumentCount
        }
        
        let toValue: (Expression) -> Value = (dereferencing)
            ? { $0.evaluate(with: context).dereference(with: context) }
            : { $0.evaluate(with: context) }
        
        let expression1 = parameters[0]
        let operand1 = toValue(expression1)
        if operand1 is ErrorableValue {
            return operand1
        }
        
        let expression2 = parameters[1]
        let operand2 = toValue(expression2)
        if operand2 is ErrorableValue {
            return operand2
        }
