Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

XMLSCHEME

Name: Anonymous 2010-10-23 19:15


<define name="f">
 <lambda args="x">
  <multiply>
   <variable name="x" />
   <funccall func="f">
    <subtract>
     <variable name="x" />
     <int value="1" />
    </substract>
   </funccall>
  </multiply>
 </lambda>
</define>


IT WILL BRING PROGRAMMING TO A WHOLE NEW LEVEL!

Name: Anonymous 2010-10-24 7:14

What compiler/front end are you using that accepts <multiply> and <subtract> tags? Mine only takes <funccall> (equivalent to <apply>). I'd write it like this:

<define name="f">
 <lambda args="x">
  <apply func="*">
   <variable name="x" />
   <apply func="f">
    <apply func="-">
     <variable name="x" />
     <int value="1" />
    </apply>
   </apply>
  </apply>
 </lambda>
</define>
If the function the value of a sub-expression, leave out the func="..." part and the first sub expression is used as the function instead.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List