summaryrefslogtreecommitdiff
path: root/test.toc
diff options
context:
space:
mode:
Diffstat (limited to 'test.toc')
-rw-r--r--test.toc3
1 files changed, 2 insertions, 1 deletions
diff --git a/test.toc b/test.toc
index b676fbe..e2263b8 100644
--- a/test.toc
+++ b/test.toc
@@ -1,5 +1,6 @@
factorial ::= fn(x: int) int {
-x*2
+ if x < 2 { 1 }
+ else { x * factorial(x-1) }
};
main ::= fn() {