summaryrefslogtreecommitdiffstats
path: root/site/index.html
diff options
context:
space:
mode:
authorBrian Cully <bjc@spork.org>2025-08-25 12:06:51 -0400
committerBrian Cully <bjc@spork.org>2025-08-25 12:07:52 -0400
commit1c81d26b706abb43ba71eb36cdb622dae03e95cd (patch)
tree3478a6da414075c675d36aa8cdf361896c6defd9 /site/index.html
parent00579203e0cb10b2be793c4f215716554e58690e (diff)
downloadautomathon-1c81d26b706abb43ba71eb36cdb622dae03e95cd.tar.gz
automathon-1c81d26b706abb43ba71eb36cdb622dae03e95cd.zip
add sample code in site
Diffstat (limited to 'site/index.html')
-rw-r--r--site/index.html14
1 files changed, 9 insertions, 5 deletions
diff --git a/site/index.html b/site/index.html
index 8551d3a..6583568 100644
--- a/site/index.html
+++ b/site/index.html
@@ -13,11 +13,15 @@
<button id='compile'>compile</button>
<br>
<div id='src' contenteditable='plaintext-only'>: fac ( n -- n )
- dup
- 1 > if
- dup 1 - fac *
- then
- ;
+ dup ( n n )
+ 1 > if ( n flag )
+ dup ( n n )
+ 1 - ( n n-1 )
+ fac ( n fac-n )
+ * ( n )
+ then ( n )
+;
+
5 fac
drop</div>
</div>