Printing 1 to 1000 without loop or conditionals
コード
var zero = function(f) function(x) x;
function succ(c) function(f) function(x) f(c(f)(x))
function add(n,m) function(f) function(x) m(f)(n(f)(x))
function multiply(n,m) function(f) function(x) n(m(f))(x)
function power(n,m) function(f) function(x) m(n)(f)(x)
function cton(c) c(function(x) {document.write(x + 1 + '\n'); return x + 1;})(0)
var two = succ(succ(zero));
var three = succ(two);
var five = add(two, three);
var thousand = power(multiply(two,five),three);
cton(thousand);
参考
実行結果