摘要:
//first self referencevar fact = function(self){ return function(n){ if(n == 0) return 1; else return n * self(self)(n-1); }}console.log(fact(fact)(10));var fact1 = function(self){ return function(n){ var f = function(h){ return function(x){ if(x == 0) return 1; else return x * h(x-1); ... 阅读全文
posted @ 2013-08-30 15:50 1957 阅读(216) 评论(0) 推荐(0) 编辑