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

11 lines
182 B
Plaintext
Raw Normal View History

2022-03-18 22:03:43 -05:00
fun factorial (n: int): int = do
case n of
| 0 -> return 1;
\ return n * factorial(n - 1);
end;
end;
fun main: void = do
factorial(5) |> @write(_);
2022-03-20 08:25:31 -05:00
end;