aboutsummaryrefslogtreecommitdiff
path: root/buzzard/demo5.th
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2019-10-30 20:04:56 +0100
committerDimitri Sokolyuk <demon@dim13.org>2019-10-30 20:04:56 +0100
commita76977af62010a392c16010c367185e61e856ffe (patch)
tree56cf4177d5bc0e3ead781d1c60818c13b1df0f3c /buzzard/demo5.th
parentc0165d167d7cb40d80028bcf7a4a6b160b5a7e83 (diff)
mv to docs
Diffstat (limited to 'buzzard/demo5.th')
-rw-r--r--buzzard/demo5.th27
1 files changed, 0 insertions, 27 deletions
diff --git a/buzzard/demo5.th b/buzzard/demo5.th
deleted file mode 100644
index d16ca1e..0000000
--- a/buzzard/demo5.th
+++ /dev/null
@@ -1,27 +0,0 @@
-( recursive factorial. given x on top, followed by )
-( an "accumulator" containing the product except for x! )
-
-: fact-help2
-
- dup if
- swap over swap
- *
- swap 1 -
- fact-help2
- then
-;
-
-: fact
-
- 1 swap
- fact-help2
- drop
-;
-
-: demo5
-
- " The factorial of 3 is: " 3 fact . cr
- " The factorial of 5 is: " 5 fact . cr
-;
-
-demo5