Church Numerals in ski by ksk

p _[_][0]until def _ c=$<.getc
c==?`?_[_]:proc{|x|c<?i?x+1:c<?k?x:proc{|y|c<?s?x:proc{|z|x[z][y[z]]}}}end

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

download

return to the top page