Factorial example

master
azur 2023-07-05 16:17:09 +07:00
parent 5dd41a62a1
commit 5616a7d15d
2 changed files with 15 additions and 1 deletions

View File

@ -4,7 +4,14 @@
Holymer is a programming language
It's pretty boring right now so come back later :D
## Status
- [x] Parser
- [x] Typechecker
- [x] IR
- [ ] Optimizer
- [ ] Complier
The IR output can sometimes be run with scheme interpreter, sometimes.
## Contributing
You need to have [Rust Toolchain](https://github.com/rust-lang/rust) installed on your machine before building it.

7
example/factorial.hlm Normal file
View File

@ -0,0 +1,7 @@
let factorial = fun (n Int) Int ->
if n > 1
then n * factorial(n - 1)
else 1
;
factorial(5);