// Promise.finally function final(callback){ const p = this.constructor; return this.then( value => p.resolve(callback()).then(() => value), reson => p.resolve(callback()).then(() => {throw reason}) ) }