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

7 lines
138 B
Plaintext
Raw Normal View History

2022-05-03 12:54:54 -05:00
fun factorial (n : int) : int =
if n == 0
| return 1
| return n * factorial(n - 1)
result : int = factorial(5)
@write(result)