git @ Cat's Eye Technologies Lanthorn / master eg / evenodd-letrec.lanthorn
master

Tree @master (Download .tar.gz)

evenodd-letrec.lanthorn @masterraw · history · blame

1
2
3
4
5
letrec
    oddp  = fun(x) -> if eq(x, 0) then false else evenp(sub(x, 1))
    evenp = fun(x) -> if eq(x, 0) then true else oddp(sub(x, 1))
in
    evenp(6)