aboutsummaryrefslogtreecommitdiff
path: root/docs/history/10-zc/code/examples/fact.zc
diff options
context:
space:
mode:
Diffstat (limited to 'docs/history/10-zc/code/examples/fact.zc')
-rw-r--r--docs/history/10-zc/code/examples/fact.zc4
1 files changed, 0 insertions, 4 deletions
diff --git a/docs/history/10-zc/code/examples/fact.zc b/docs/history/10-zc/code/examples/fact.zc
deleted file mode 100644
index 2a218b2..0000000
--- a/docs/history/10-zc/code/examples/fact.zc
+++ /dev/null
@@ -1,4 +0,0 @@
-fn fact(n) { if (n < 2) return 1; return n * fact(n - 1); }
-// prints in binary, like the old asm example
-fn bin(n) { if (n > 1) bin(n >> 1); putc('0' + (n & 1)); return 0; }
-fn main() { bin(fact(10)); putc(10); putn(fact(10)); putc(10); return 0; }