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

Tree @master (Download .tar.gz)

evenodd-open.lanthorn @masterraw · history · blame

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