anchor.diff:  		division -> Operand1/Operand2
   	end.
   
  -compile_impl(Expression, Stack) ->
  -	NewStack = case Expression of 
  -		{number, Value} -> [Value|Stack];
  -		{Operator, Operand1} -> 
  -			[Operator|compile_impl(Operand1, Stack)];
  -		{Operator, Operand1, Operand2} -> 
  -			[Operator|compile_impl(Operand2, compile_impl(Operand1, Stack))]
  -	end,
  -	NewStack.
  +compile_impl({number, Value}, Stack) ->
  +	[Value|Stack];
  +compile_impl({Operator, Operand1}, Stack) ->
  +	[Operator|compile_impl(Operand1, Stack)];
  +compile_impl({Operator, Operand1, Operand2}, Stack) ->
  +	[Operator|compile_impl(Operand2, compile_impl(Operand1, Stack))];
  +compile_impl({if_then_else, Operand1, Operand2, Operand3}, Stack) ->
  +	[if_then_else|compile_impl(Operand1, 
  +		compile_impl(Operand2, compile_impl(Operand3, Stack)))].
   	
   tokenize([]) ->
   	[];
  
positive.code: 		{number, Value} -> {number, -Value};
  		_ -> {unary_minus, SimplifiedExpression}
  	end;
  simplify_impl({Operator, Operand1, Operand2}) ->
  	SimplifiedOperand1 = simplify_impl(Operand1),
  	SimplifiedOperand2 = simplify_impl(Operand2),
  
negative.code: simulate_impl([unary_minus|T]) ->
  	{Operand, NewStack} = simulate_impl(T),
  	{do_unary_operation(unary_minus, Operand), NewStack};
  simulate_impl([if_then_else|T]) ->
  	{Operand1, NewStack} = simulate_impl(T),
  	case Operand1 of
  		0 -> simulate_impl(unroll_stack(NewStack));
  		_ -> 
  			{ThenResult, StackWithElse} = simulate_impl(NewStack),
  			StackWithoutElse = unroll_stack(StackWithElse),
  			{ThenResult, StackWithoutElse}
  	end;
  simulate_impl([H|T]) ->
  	{Operand2, NewStack} = simulate_impl(T),
  	{Operand1, NewStack2} = simulate_impl(NewStack),
  	{do_binary_operation(H, Operand1, Operand2), NewStack2}.
  
  unroll_stack([H|T]) when is_number(H)-> T;
  unroll_stack([unary_minus|T]) -> unroll_stack(T);
  unroll_stack([if_then_else|T]) ->
  	%Unroll three operands
  	unroll_stack(unroll_stack(unroll_stack(T)));
  unroll_stack([_|T]) ->
  	%Unroll two operands
  	unroll_stack(unroll_stack(T));
  unroll_stack([]) -> [].
  
  do_unary_operation(Operation, Operand) when Operation =:= unary_minus ->
  	-Operand.
  