Problem
Implement makeCancelable(promise) that returns { promise, cancel }. Calling cancel() should make the returned promise reject with a cancellation marker, and the original resolution should be ignored after cancellation.
function makeCancelable(promise) {
// return { promise, cancel }
}