Church Numerals in ski by ksk

let o=Obj.magic
let rec p x=Printf.printf"%d
"(!0succ x);!0and(!)_=Scanf.scanf"%c"(function '`'->let x=o!0in x!0|'s'->o(fun x(!)z->x z!z)|'k'->fun x y->o x|'i'->o|_->p 0);;p 0

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page