mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
Factorial example
This commit is contained in:
parent
5dd41a62a1
commit
5616a7d15d
|
@ -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
7
example/factorial.hlm
Normal file
|
@ -0,0 +1,7 @@
|
|||
let factorial = fun (n Int) Int ->
|
||||
if n > 1
|
||||
then n * factorial(n - 1)
|
||||
else 1
|
||||
;
|
||||
|
||||
factorial(5);
|
Loading…
Reference in a new issue