.hs -> .cr

update examples
This commit is contained in:
crumbtoo
2024-02-08 14:02:03 -07:00
parent d2e301fad7
commit 055fbfd40c
4 changed files with 12 additions and 9 deletions

7
examples/factorial.cr Normal file
View File

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