Wherever `f` is called, there is a potential for an exception to be raised. As with `map`, we should catch these exceptions and `reject` the promise with it:

```javascript
try {
    promise.reject(f(reason));
} catch (e) {
    promise.reject(e);
}
```