code: function(op, mods) {
      var getValue = function(t) {
        if (t[0] === '$') {
          return Number(mods[t])
        }
        return Number(t)
      }
  
      var type = op.type
      if (type === 'n') {
        return getValue(op.val)
      }
      if (type === '+') {
        return evaluate(op.left, mods) + evaluate(op.right, mods)
      }
      if (type === '-') {
        return evaluate(op.left, mods) - evaluate(op.right, mods)
      }
      if (type === 'x') {
        return evaluate(op.left, mods) * evaluate(op.right, mods)
      }
      // else division
      return evaluate(op.left, mods) / evaluate(op.right, mods)
    }
docs: evalute by recursively traversing the tree