<and>
  <expr>
    <define name="factorial" args="x">
      <if>
	<lt><x/>2</lt>
	<x/>
	<multiply>
	  <x/>
	  <factorial><subtract><x/>1</subtract></factorial>
	</multiply>
      </if>
    </define>
    <if>
      <eq>
	<factorial>7</factorial>
	5040
      </eq>
      <print newline="true">PASS</print>
      <expr>
	<print newline="true">FAIL</print>
	<false/>
      </expr>
    </if>
  </expr>
  <expr>
    <define name="factorial" args="x">
      <define name="iterator" args="product counter max">
	<if>
	  <gt><counter/><max/></gt>
	  <product/>
	  <iterator>
	    <multiply><counter/><product/></multiply>
	    <add><counter/>1</add>
	    <max/>
	  </iterator>
	</if>
      </define>

      <iterator>1 1 <x/></iterator>
    </define>

    <if>
      <eq>
	<factorial>7</factorial>
	5040
      </eq>
      <print newline="true">PASS</print>
      <expr>
	<print newline="true">FAIL</print>
	<false/>
      </expr>
    </if>
  </expr>
</and>
