-
-
Save 0x0dea/eb96b4d620f2b2034f4e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<function name="factorial"> | |
<parameters> | |
<parameter name="x" /> | |
</parameters> | |
<body> | |
<if> | |
<condition> | |
<call function="<"> | |
<arguments> | |
<argument value="x" /> | |
<argument value="2" /> | |
</arguments> | |
</call> | |
</condition> | |
<then> | |
<return value="1" /> | |
</then> | |
<else> | |
<return> | |
<call function="*"> | |
<arguments> | |
<argument value="x" /> | |
<argument> | |
<call function="factorial"> | |
<arguments> | |
<argument> | |
<call function="-"> | |
<argument value="x" /> | |
<argument value="1" /> | |
</call> | |
</argument> | |
</arguments> | |
</call> | |
</argument> | |
</arguments> | |
</call> | |
</return> | |
</else> | |
</if> | |
</body> | |
</function> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment