1
1
Fork 0
mirror of https://github.com/azur1s/bobbylisp.git synced 2024-10-16 02:37:40 -05:00

Factorial example

This commit is contained in:
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);