code: Node createFunction(String name, Node paramList, Node body, JSType type) {
      Node nameNode = createName(name, type);
      Node result = IR.function(nameNode, paramList, body);
      if (isAddingTypes()) {
        checkArgument(type.isFunctionType(), type);
        result.setJSType(type);
      }
      return result;
    }
docs: Creates a function `function name(paramList) { body }`
  
  @param name STRING node - empty string if no name
  @param paramList PARAM_LIST node
  @param body BLOCK node
  @param type type to apply to the function itself