code: public Object evaluateFunction(String functionName, StringBuilder textOutput, Object[] arguments) throws Exception {
  		ifAsyncWeCant("evaluate a function");
  
  		if (functionName == null) {
  			throw new Exception("Function is null");
  		} else if (functionName.trim().isEmpty()) {
  			throw new Exception("Function is empty or white space.");
  		}
  
  		// Get the content that we need to run
  		Container funcContainer = knotContainerWithName(functionName);
  		if (funcContainer == null)
  			throw new Exception("Function doesn't exist: '" + functionName + "'");
  
  		// Snapshot the output stream
  		ArrayList<RTObject> outputStreamBefore = new ArrayList<RTObject>(state.getOutputStream());
  		state.resetOutput();
  
  		// State will temporarily replace the callstack in order to evaluate
  		state.startFunctionEvaluationFromGame(funcContainer, arguments);
  
  		// Evaluate the function, and collect the string output
  		while (canContinue()) {
  			String text = Continue();
  
  			if (textOutput != null)
  				textOutput.append(text);
  		}
  
  		// Restore the output stream in case this was called
  		// during main story evaluation.
  		state.resetOutput(outputStreamBefore);
  
  		// Finish evaluation, and see whether anything was produced
  		Object result = state.completeFunctionEvaluationFromGame();
  		return result;
  	}
docs: Evaluates a function defined in ink, and gathers the possibly multi-line text
  as generated by the function.
  
  @param arguments
  The arguments that the ink function takes, if any. Note that we
  don't (can't) do any validation on the number of arguments right
  now, so make sure you get it right!
  @param functionName
  The name of the function as declared in ink.
  @param textOutput
  This text output is any text written as normal content within the
  function, as opposed to the return value, as returned with `~
  return`.
  @return The return value as returned from the ink function with `~ return
  myValue`, or null if nothing is returned.
  @throws Exception