diff options
Diffstat (limited to 'examples/factorial.urm')
-rw-r--r-- | examples/factorial.urm | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/examples/factorial.urm b/examples/factorial.urm new file mode 100644 index 0000000..04d6e1d --- /dev/null +++ b/examples/factorial.urm | |||
@@ -0,0 +1,30 @@ | |||
1 | ZERO 4 | ||
2 | JUMP 1 4 4 | ||
3 | ZERO 8 | ||
4 | JUMP 8 8 7 | ||
5 | Succ 1 | ||
6 | ZERO 9 | ||
7 | JUMP 9 9 29 | ||
8 | COPY 2 1 | ||
9 | ZERO 1 | ||
10 | Succ 1 | ||
11 | ZERO 3 | ||
12 | Succ 3 | ||
13 | COPY 6 1 | ||
14 | ZERO 1 | ||
15 | ZERO 5 | ||
16 | JUMP 3 5 25 | ||
17 | ZERO 7 | ||
18 | JUMP 6 7 22 | ||
19 | Succ 1 | ||
20 | Succ 7 | ||
21 | ZERO 10 | ||
22 | JUMP 10 10 17 | ||
23 | Succ 5 | ||
24 | ZERO 11 | ||
25 | JUMP 11 11 15 | ||
26 | JUMP 2 3 29 | ||
27 | Succ 3 | ||
28 | ZERO 12 | ||
29 | JUMP 12 12 12 | ||
30 | JUMP 1 1 30 | ||