Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
29
Task/Ackermann-function/XSLT/ackermann-function-1.xslt
Normal file
29
Task/Ackermann-function/XSLT/ackermann-function-1.xslt
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<xsl:template name="ackermann">
|
||||
<xsl:param name="m"/>
|
||||
<xsl:param name="n"/>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="$m = 0">
|
||||
<xsl:value-of select="$n+1"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="$n = 0">
|
||||
<xsl:call-template name="ackermann">
|
||||
<xsl:with-param name="m" select="$m - 1"/>
|
||||
<xsl:with-param name="n" select="'1'"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:variable name="p">
|
||||
<xsl:call-template name="ackermann">
|
||||
<xsl:with-param name="m" select="$m"/>
|
||||
<xsl:with-param name="n" select="$n - 1"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:call-template name="ackermann">
|
||||
<xsl:with-param name="m" select="$m - 1"/>
|
||||
<xsl:with-param name="n" select="$p"/>
|
||||
</xsl:call-template>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
Loading…
Add table
Add a link
Reference in a new issue