code: public void put(String name, Operation function, Template template,
  			SourceRange sourceRange) throws EvaluationException {
  
  		assert (name != null);
  		assert (function != null);
  
  		// Create the new function definition.
  		FunctionDefinition defn = new FunctionDefinition(template, sourceRange,
  				function);
  
  		// Actually set this in the functions hash.
  		FunctionDefinition previous = functions.put(name, defn);
  
  		// Oops, the function was already defined. Create a descriptive error
  		// message and abort the processing.
  		if (previous != null) {
  			String msg = MessageUtils.format(MSG_DUPLICATE_FUNCTION, name,
  					previous.template.source, previous.sourceRange);
  			throw new EvaluationException(msg);
  		}
  
  	}
docs: Define the given DML block as a function with the given name in this
  context. Note that functions may not be redefined; attempting to do so
  will throw an EvaluationException.
  
  @param name
  name for the function
  @param function
  code for the function as a DML block
  @param template
  template in which this function is defined (used for error
  handling)
  @param sourceRange
  location in the template where this function is defined (used
  for error handling)
  
  @throws EvaluationException
  if a function with the given name already exists