// $ babel-node --optional es7.decorators index.js class Counter { constructor(initial = 0) { this.current = initial; } @contract up(i) { this.current += i; return this.current; } } function contract(tar, name, desc) { // 事前条件 function before(i) { console.assert(i > 0, `arg for ${name} should be positive value`); } // 事後条件 function after(result) { console.assert(result > 0, `result of ${name} shou
