 			if (Math.max(tokens.indexOf('?')) >= 0)
 				throw new Error('Invalid conditional branch');
 			
-			// next step: inline functions, right to left
+			// next step: inline functions (headers only), right to left
 			i = tokens.length;
 			while (i--)
 			{
 				if (tokens[i] == FUNCTION)
-					tokens.splice(i, 3, compileOperator(FUNCTION, [tokens[i + 1], tokens[i + 2]]));
+					tokens.splice(i, 2, compileFunctionHeader(FUNCTION, tokens[i + 1]));
 				if (tokens[i] == '=>')
-					tokens.splice(i - 1, 3, compileOperator('=>', [tokens[i - 1], tokens[i + 1]]));
+					tokens.splice(i - 1, 2, compileFunctionHeader('=>', tokens[i - 1]));
 			}
 			
 			// next step: function applications

			return cfc && !cfc.compiledParams;
		}
		
		/**
		 * This will check if the compiled object is a function definition.
		 * @param compiledObject A compiled object returned by compileToObject().

			}
		}
		
		private function compileOperator(operatorName:String, compiledParams:Array):CompiledFunctionCall
		{
			operatorName = OPERATOR_ESCAPE + operatorName;
			return new CompiledFunctionCall(new CompiledConstant(operatorName, constants[operatorName]), compiledParams);
		}
		
		private function compileFunctionHeader(functionOperator:String, paramsToken:Object):ICompiledObject
		{
			if (functionOperator != FUNCTION && functionOperator != '=>')
				throw new Error("compileFunctionHeader called with unsupported operator: " + functionOperator);
			
			// when compiling a function operator, only the argument list should be provided
			var args:CompiledFunctionCall = paramsToken as CompiledFunctionCall;
			if (!args)
				throwInvalidSyntax(functionOperator);
			
			// if there is only a single variable name, wrap it in an operator ',' call
			if (!args.compiledParams)
				args = compileOperator(',', [args]);
			
			if (args.evaluatedMethod != operators[','])
				throwInvalidSyntax(functionOperator);
			
			// verify that each parameter inside operator ',' is a variable name or a local assignment to a constant.
			var variableNames:Array = [];
			var variableValues:Array = [];
			for each (var token:Object in args.compiledParams)
			{
				var variable:CompiledFunctionCall = token as CompiledFunctionCall;
				if (!variable)
					throwInvalidSyntax(functionOperator);
				
				if (!variable.compiledParams)
				{
					// local variable
					variableNames.push(variable.evaluatedMethod);
					variableValues.push(undefined);
				}
				else if (variable.evaluatedMethod == operators['='] && variable.compiledParams.length == 2 && variable.compiledParams[1] is CompiledConstant)
				{
					// local variable assignment
					variableNames.push(variable.evaluatedParams[0]);
					variableValues.push(variable.evaluatedParams[1]);
				}
				else
					throwInvalidSyntax(functionOperator);
			}
			var functionParams:Object = {};
			functionParams[FUNCTION_PARAM_NAMES] = variableNames;
			functionParams[FUNCTION_PARAM_VALUES] = variableValues;
			
			return compileOperator(functionOperator, [new CompiledConstant(null, functionParams)]);
		}
		
		private function compileFunctionDefinition(functionHeader:CompiledFunctionCall, body:ICompiledObject):ICompiledObject
		{
			if (!body)
				throwInvalidSyntax((functionHeader.compiledMethod as CompiledConstant).name.substr(OPERATOR_ESCAPE.length));
			var cc:CompiledConstant = functionHeader.compiledParams[0];
			if (cc.value[FUNCTION_CODE] != null)
				throw new Error("Unexpected error: attempting to overwrite function body");
			cc.value[FUNCTION_CODE] = finalize(body);
			functionHeader.evaluateConstants();
			return functionHeader;
		}
		
		private function compileVariableAssignment(variableToken:*, assignmentOperator:String, valueToken:*):CompiledFunctionCall
