git @ Cat's Eye Technologies Lanthorn / master eg / factorial-open.lanthorn
master

Tree @master (Download .tar.gz)

factorial-open.lanthorn @masterraw · history · blame

1
2
3
4
5
let
    fact0 = fun(n, f) -> if eq(n,1) then 1 else mul(n,f(sub(n, 1), f))
    fact  = fun(n)    -> fact0(n, fact0)
in
    fact(5)