摘要:
// v2.1
Object.prototype.unfold = function(incrementor) {
return [this].concat(
(function(next,act) {
return next == null ? [] : act(next);
})(incrementor(this),function(next) {
return next.unfold(incrementor)
})
)
};
阅读全文