public void setFunction(UserDefinedFunction functionDef) {
private void setFunction(UserDefinedFunction functionDef) {
	public void setFunction(UserDefinedFunction functionDef) {		this.functionDef = functionDef;		this.mySignature = functionDef.getSignature();		this.expression = functionDef;		SequenceType returnType = functionDef.getSignature().getReturnType();		// add return type checks		if(returnType.getCardinality() != Cardinality.ZERO_OR_MORE)			expression = new DynamicCardinalityCheck(context, returnType.getCardinality(), expression);		if(Type.subTypeOf(returnType.getPrimaryType(), Type.ATOMIC))			expression = new Atomize(context, expression);		if(Type.subTypeOf(returnType.getPrimaryType(), Type.NUMBER))			expression = new UntypedValueCheck(context, returnType.getPrimaryType(), expression);		else if(returnType.getPrimaryType() != Type.ITEM)			expression = new DynamicTypeCheck(context, returnType.getPrimaryType(), expression);	}