add examples

This commit is contained in:
crumbtoo
2023-12-14 13:29:08 -07:00
parent f2b6e43d59
commit 633882119b
3 changed files with 19 additions and 0 deletions

7
examples/factorial.hs Normal file
View File

@@ -0,0 +1,7 @@
fac n = case (==#) n 0 of
{ 1 -> 1
; 0 -> (*#) n (fac ((-#) n 1))
};
main = fac 3;