Church Numerals in ski by kaki

alias w proc
s=w{|x|w{|y|w{|z|x[z][y[z]]}}}
i=s[k=w{|x|w{|y|x}}][k]
def r
c=$<.getc
c<?a?"#{r}[#{r}]":c.chr
end
loop{p eval(r)[w{|x|x+1}][0]
getc}

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

download

return to the top page