mirror of
https://github.com/azur1s/bobbylisp.git
synced 2024-10-16 02:37:40 -05:00
9 lines
177 B
Plaintext
9 lines
177 B
Plaintext
fun factorial n =
|
|
let helper = \n acc ->
|
|
if n > 0
|
|
then helper(n - 1, acc * n)
|
|
else acc
|
|
in
|
|
helper(n, 1)
|
|
|
|
fun main = println(factorial(20)) |